Bug 901312 - crash in mozilla::dom::ContentParent::ActorDestroy @ nsFrameMessageManager::Disconnect, r=jlebar
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Mon, 05 Aug 2013 14:02:38 +0300
changeset 154326 5fd699ed1c557f65264bb33935c0dcedc94c48a2
parent 154325 d74169f154d91cc185fa4e04dc26c7192d519e08
child 154327 6367c753c7f90671bf88bf613edf8c540468b790
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs901312
milestone25.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 901312 - crash in mozilla::dom::ContentParent::ActorDestroy @ nsFrameMessageManager::Disconnect, r=jlebar
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -850,17 +850,20 @@ ContentParent::ShutDownProcess(bool aClo
   // returned from Get*() while in the midst of shutdown.
   MarkAsDead();
 
   // A ContentParent object might not get freed until after XPCOM shutdown has
   // shut down the cycle collector.  But by then it's too late to release any
   // CC'ed objects, so we need to null them out here, while we still can.  See
   // bug 899761.
   mMemoryReporters.Clear();
-  mMessageManager = nullptr;
+  if (mMessageManager) {
+    mMessageManager->Disconnect();
+    mMessageManager = nullptr;
+  }
 }
 
 void
 ContentParent::MarkAsDead()
 {
     if (!mAppManifestURL.IsEmpty()) {
         if (sAppContentParents) {
             sAppContentParents->Remove(mAppManifestURL);
@@ -989,17 +992,19 @@ ContentParent::ActorDestroy(ActorDestroy
 #ifdef MOZ_WIDGET_GONK
         obs->RemoveObserver(static_cast<nsIObserver*>(this), NS_VOLUME_STATE_CHANGED);
 #endif
 #ifdef ACCESSIBILITY
         obs->RemoveObserver(static_cast<nsIObserver*>(this), "a11y-init-or-shutdown");
 #endif
     }
 
-    mMessageManager->Disconnect();
+    if (ppm) {
+      ppm->Disconnect();
+    }
 
     // clear the child memory reporters
     InfallibleTArray<MemoryReport> empty;
     SetChildMemoryReporters(empty);
 
     // remove the global remote preferences observers
     Preferences::RemoveObserver(this, "");