From 43a19a73a5b424346235c2cd5799e64de09cb790 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Fri, 7 Feb 2014 16:14:59 -0800 Subject: [PATCH] Bug 968542 - Prevent IPC blobs from entraining ContentParent objects. r=bent --- dom/ipc/Blob.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dom/ipc/Blob.cpp b/dom/ipc/Blob.cpp index bfabf12ed3e8..6754f1ac7fe3 100644 --- a/dom/ipc/Blob.cpp +++ b/dom/ipc/Blob.cpp @@ -955,6 +955,8 @@ private: MOZ_ASSERT(!mSlice); MOZ_ASSERT(!mDone); + NS_ENSURE_TRUE_VOID(mActor->Manager()); + NormalBlobConstructorParams normalParams; normalParams.contentType() = mContentType; normalParams.length() = mLength; @@ -1352,6 +1354,8 @@ Blob::ActorDestroy(ActorDestroyReason aWhy) if (mBlob && mOwnsBlob) { mBlob->Release(); } + + mManager = nullptr; } template