Bug 880037: Don't try to mark message managers when we're not in the root process r=jlebar
authorDavid Zbarsky <dzbarsky@gmail.com>
Fri, 07 Jun 2013 14:05:36 -0700
changeset 134425 b9b9d53a5c2d9652101ff4928e2b8eb0b03e5724
parent 134424 f9f7ba08df906a127b7412fecbd1196167e3eb30
child 134426 53318030bbb10d9245a3ee8f734f543fb90d689d
push id24798
push useremorley@mozilla.com
push dateMon, 10 Jun 2013 09:05:46 +0000
treeherdermozilla-central@625de2ded691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs880037
milestone24.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 880037: Don't try to mark message managers when we're not in the root process r=jlebar
content/base/src/nsCCUncollectableMarker.cpp
--- a/content/base/src/nsCCUncollectableMarker.cpp
+++ b/content/base/src/nsCCUncollectableMarker.cpp
@@ -89,16 +89,20 @@ MarkUserDataHandler(void* aNode, nsIAtom
   if (d && nsCCUncollectableMarker::InGeneration(d->GetMarkedCCGeneration())) {
     Element::MarkUserDataHandler(aNode, aKey, aValue, aData);
   }
 }
 
 static void
 MarkMessageManagers()
 {
+  // The global message manager only exists in the root process.
+  if (XRE_GetProcessType() != GeckoProcessType_Default) {
+    return;
+  }
   nsCOMPtr<nsIMessageBroadcaster> strongGlobalMM =
     do_GetService("@mozilla.org/globalmessagemanager;1");
   if (!strongGlobalMM) {
     return;
   }
   nsIMessageBroadcaster* globalMM = strongGlobalMM;
   strongGlobalMM = nullptr;