diff --git a/ipc/glue/MessageLink.cpp b/ipc/glue/MessageLink.cpp index 0e011fc7739e..36fc9103e49d 100644 --- a/ipc/glue/MessageLink.cpp +++ b/ipc/glue/MessageLink.cpp @@ -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();