From c229b0c58057d08d587fff6277d15ee60a59daa7 Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Thu, 30 Jul 2015 15:59:49 -0700 Subject: [PATCH] Bug 1189550 - In parent process, cpmm.initialProcessData should be same as ppmm.initialProcessData (r=smaug) --- dom/base/nsFrameMessageManager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp index 9d33b8d3ffe..dd673f8ffd6 100644 --- a/dom/base/nsFrameMessageManager.cpp +++ b/dom/base/nsFrameMessageManager.cpp @@ -1432,6 +1432,14 @@ nsFrameMessageManager::GetInitialProcessData(JSContext* aCx, JS::MutableHandleVa init.setObject(*obj); } + if (!mChrome && XRE_IsParentProcess()) { + // This is the cpmm in the parent process. We should use the same object as the ppmm. + nsCOMPtr ppmm = + do_GetService("@mozilla.org/parentprocessmessagemanager;1"); + ppmm->GetInitialProcessData(aCx, &init); + mInitialProcessData = init; + } + if (!JS_WrapValue(aCx, &init)) { return NS_ERROR_OUT_OF_MEMORY; } @@ -2164,7 +2172,6 @@ NS_NewChildProcessMessageManager(nsISyncMessageSender** aResult) NS_ENSURE_TRUE(global->Init(), NS_ERROR_UNEXPECTED); global.forget(aResult); return NS_OK; - } static PLDHashOperator