Bug 1237201 part 4 - Handle Vector OOM in ipc/. r=billm
This commit is contained in:
@@ -226,7 +226,8 @@ public:
|
|||||||
if (mThat.mCxxStackFrames.empty())
|
if (mThat.mCxxStackFrames.empty())
|
||||||
mThat.EnteredCxxStack();
|
mThat.EnteredCxxStack();
|
||||||
|
|
||||||
mThat.mCxxStackFrames.append(InterruptFrame(direction, msg));
|
if (!mThat.mCxxStackFrames.append(InterruptFrame(direction, msg)))
|
||||||
|
MOZ_CRASH();
|
||||||
|
|
||||||
const InterruptFrame& frame = mThat.mCxxStackFrames.back();
|
const InterruptFrame& frame = mThat.mCxxStackFrames.back();
|
||||||
|
|
||||||
@@ -778,7 +779,8 @@ MessageChannel::ProcessPendingRequests()
|
|||||||
for (MessageQueue::iterator it = mPending.begin(); it != mPending.end(); ) {
|
for (MessageQueue::iterator it = mPending.begin(); it != mPending.end(); ) {
|
||||||
Message &msg = *it;
|
Message &msg = *it;
|
||||||
if (!ShouldDeferMessage(msg)) {
|
if (!ShouldDeferMessage(msg)) {
|
||||||
toProcess.append(Move(msg));
|
if (!toProcess.append(Move(msg)))
|
||||||
|
MOZ_CRASH();
|
||||||
it = mPending.erase(it);
|
it = mPending.erase(it);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user