Bug 1268616 - Part 2: Stop sending messages that are too large. r=billm

This commit is contained in:
Eric Rahm
2016-05-04 17:38:53 -07:00
parent f87f09d19c
commit 7979e16349

View File

@@ -9,6 +9,7 @@
#include "mozilla/ipc/MessageChannel.h" #include "mozilla/ipc/MessageChannel.h"
#include "mozilla/ipc/BrowserProcessSubThread.h" #include "mozilla/ipc/BrowserProcessSubThread.h"
#include "mozilla/ipc/ProtocolUtils.h" #include "mozilla/ipc/ProtocolUtils.h"
#include "chrome/common/ipc_channel.h"
#ifdef MOZ_NUWA_PROCESS #ifdef MOZ_NUWA_PROCESS
#include "ipc/Nuwa.h" #include "ipc/Nuwa.h"
@@ -157,6 +158,7 @@ ProcessLink::EchoMessage(Message *msg)
void void
ProcessLink::SendMessage(Message *msg) ProcessLink::SendMessage(Message *msg)
{ {
MOZ_RELEASE_ASSERT(msg->size() < IPC::Channel::kMaximumMessageSize);
mChan->AssertWorkerThread(); mChan->AssertWorkerThread();
mChan->mMonitor->AssertCurrentThreadOwns(); mChan->mMonitor->AssertCurrentThreadOwns();