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 1e768352f4
commit 9caf0110e8

View File

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