Open Bug 1794828 Opened 2 years ago Updated 2 years ago

Improve error reporting in IPC serializers/deserializers

Categories

(Core :: IPC, enhancement)

enhancement

Tracking

()

People

(Reporter: nika, Unassigned)

References

Details

Right now the only error reporting mechanisms in ParamTraits implementations are either to return false (which provides no context on the error), or to call a{Reader,Writer}->FatalError, which forwards to the IProtocol::FatalError method. It might be nice to add more methods like FatalError for more specific types of errors, to make it easier to report errors closer to where they're happening in IPC serializers.

One example of where this might be useful is for OOM-style errors, which currently are either handled by using infallible memory operations, or by failing in one of the above ways. If we use an infallible memory operation, we can get a crash, but can't recover from it easily for things like testing or unimportant messages, but if we fail in one of the other ways, the error is reported with less context. This might be useful to get things like the OOM allocation size for bug 1794059.

You need to log in before you can comment on or make changes to this bug.