From 9dab9d92d920d5a619f6a96518a4fd2bdd7e0894 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 9 Oct 2015 15:22:00 +0200 Subject: [PATCH] Bug 1132203 - Send app info before running process scripts. r=billm --- dom/ipc/ContentParent.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 03cdca4eea9..f3a8a6102ca 100755 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -2514,18 +2514,6 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority, chromeRegistry->SendRegisteredChrome(this); } - // Initialize the message manager (and load delayed scripts) now that we - // have established communications with the child. - mMessageManager->InitWithCallback(this); - - // Set the subprocess's priority. We do this early on because we're likely - // /lowering/ the process's CPU and memory priority, which it has inherited - // from this process. - // - // This call can cause us to send IPC messages to the child process, so it - // must come after the Open() call above. - ProcessPriorityManager::SetProcessPriority(this, aInitialPriority); - if (gAppData) { nsCString version(gAppData->version); nsCString buildID(gAppData->buildID); @@ -2538,6 +2526,18 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority, unused << SendAppInfo(version, buildID, name, UAName, ID, vendor); } + // Initialize the message manager (and load delayed scripts) now that we + // have established communications with the child. + mMessageManager->InitWithCallback(this); + + // Set the subprocess's priority. We do this early on because we're likely + // /lowering/ the process's CPU and memory priority, which it has inherited + // from this process. + // + // This call can cause us to send IPC messages to the child process, so it + // must come after the Open() call above. + ProcessPriorityManager::SetProcessPriority(this, aInitialPriority); + if (aSetupOffMainThreadCompositing) { // NB: internally, this will send an IPC message to the child // process to get it to create the CompositorChild. This