mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1274404 - Annotate IPC message name and size when crashing due to message size. r=mccr8
This commit is contained in:
parent
d6c154f454
commit
ff177872a0
@ -158,7 +158,12 @@ ProcessLink::EchoMessage(Message *msg)
|
||||
void
|
||||
ProcessLink::SendMessage(Message *msg)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(msg->size() < IPC::Channel::kMaximumMessageSize);
|
||||
if (msg->size() > IPC::Channel::kMaximumMessageSize) {
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCMessageName"), nsDependentCString(msg->name()));
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCMessageSize"), nsPrintfCString("%d", msg->size()));
|
||||
MOZ_CRASH("IPC message size is too large");
|
||||
}
|
||||
|
||||
mChan->AssertWorkerThread();
|
||||
mChan->mMonitor->AssertCurrentThreadOwns();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user