Bug 841634 - Assign ContentParent::mChildID to a unique value in the constructor, instead of in RecvGetProcessAttributes. r=cjones
authorJustin Lebar <justin.lebar@gmail.com>
Fri, 15 Feb 2013 08:40:35 -0500
changeset 131907 6bb9636d8f6899c60d720298cdbca73c18cac7bc
parent 131906 d61dec75e9a3407473a66cb68b64295efde783d8
child 131908 7dd9c9b874f54d9c6d05b859f453f94680614dff
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs841634
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 841634 - Assign ContentParent::mChildID to a unique value in the constructor, instead of in RecvGetProcessAttributes. r=cjones
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1066,17 +1066,17 @@ ContentParent::GetTestShellSingleton()
 }
 
 ContentParent::ContentParent(const nsAString& aAppManifestURL,
                              bool aIsForBrowser,
                              ChildPrivileges aOSPrivileges,
                              ProcessPriority aInitialPriority /* = PROCESS_PRIORITY_FOREGROUND */)
     : mSubprocess(nullptr)
     , mOSPrivileges(aOSPrivileges)
-    , mChildID(CONTENT_PROCESS_ID_UNKNOWN)
+    , mChildID(gContentChildID++)
     , mGeolocationWatchID(-1)
     , mRunToCompletionDepth(0)
     , mShouldCallUnblockChild(false)
     , mAppManifestURL(aAppManifestURL)
     , mForceKillTask(nullptr)
     , mNumDestroyingTabs(0)
     , mIsAlive(true)
     , mIsDestroyed(false)
@@ -1578,17 +1578,17 @@ ContentParent::AllocPImageBridge(mozilla
 {
     return ImageBridgeParent::Create(aTransport, aOtherProcess);
 }
 
 bool
 ContentParent::RecvGetProcessAttributes(uint64_t* aId,
                                         bool* aIsForApp, bool* aIsForBrowser)
 {
-    *aId = mChildID = gContentChildID++;
+    *aId = mChildID;
     *aIsForApp = IsForApp();
     *aIsForBrowser = mIsForBrowser;
 
     return true;
 }
 
 bool
 ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline)