Bug 1748852: Assert on IPC_FAIL unless fuzzing. r=ipc-reviewers,nika,media-playback-reviewers,alwu

Differential Revision: https://phabricator.services.mozilla.com/D135238
This commit is contained in:
Jens Stutte
2022-01-20 15:42:57 +00:00
parent 8c124e4008
commit 6be78aaba0
4 changed files with 55 additions and 26 deletions

View File

@@ -62,6 +62,11 @@ IPCResult IPCResult::Fail(NotNull<IProtocol*> actor, const char* where,
nsPrintfCString errorMsg("%s %s\n", where, why);
actor->GetIPCChannel()->Listener()->ProcessingError(
HasResultCodes::MsgProcessingError, errorMsg.get());
MOZ_ASSERT_UNLESS_FUZZING(false,
"Please ensure to IPC_FAIL only when in an "
"unrecoverable, unexpected state.");
return IPCResult(false);
}