Bug 1121713 - [e10s] CompositorParent should clear itself out of LayerTreeState when destroyed (r=nical)
authorBill McCloskey <wmccloskey@mozilla.com>
Fri, 16 Jan 2015 10:06:11 -0800
changeset 251410 dff2539946b2e870923759e1bfd39212fa267469
parent 251409 68b90a5407b2357565d2804028e6abd135ae4a15
child 251411 613d80a116b4ee9e9f69889cecba17d86efddb8b
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1121713
milestone38.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 1121713 - [e10s] CompositorParent should clear itself out of LayerTreeState when destroyed (r=nical)
gfx/layers/ipc/CompositorParent.cpp
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -476,16 +476,17 @@ CompositorParent::RecvWillStop()
     MonitorAutoLock lock(*sIndirectLayerTreesLock);
     for (LayerTreeMap::iterator it = sIndirectLayerTrees.begin();
          it != sIndirectLayerTrees.end(); it++)
     {
       LayerTreeState* lts = &it->second;
       if (lts->mParent == this) {
         mLayerManager->ClearCachedResources(lts->mRoot);
         lts->mLayerManager = nullptr;
+        lts->mParent = nullptr;
       }
     }
     mLayerManager->Destroy();
     mLayerManager = nullptr;
     mCompositionManager = nullptr;
   }
 
   return true;
@@ -1704,17 +1705,19 @@ CrossProcessCompositorParent::ForceCompo
 {
   uint64_t id = aLayerTree->GetId();
   MOZ_ASSERT(id != 0);
   CompositorParent* parent;
   { // scope lock
     MonitorAutoLock lock(*sIndirectLayerTreesLock);
     parent = sIndirectLayerTrees[id].mParent;
   }
-  parent->ForceComposite(aLayerTree);
+  if (parent) {
+    parent->ForceComposite(aLayerTree);
+  }
 }
 
 bool
 CrossProcessCompositorParent::SetTestSampleTime(
   LayerTransactionParent* aLayerTree, const TimeStamp& aTime)
 {
   uint64_t id = aLayerTree->GetId();
   MOZ_ASSERT(id != 0);