Bug 983489 - Crash on nsIAppStartup.quit() - application crashed [@ mozilla::gl::GLContext::MakeCurrent(bool)]. r=nical
☠☠ backed out by 28e35ed195ab ☠ ☠
authorVincent Chen <vichen@mozilla.com>
Thu, 17 Apr 2014 02:11:00 +0200
changeset 179117 b032a90ee0832d4459bc2efb0ac15e6b5e7a4f20
parent 179116 62e295f8483e7309debf14b42d0fe24ed4860b9b
child 179118 2488b4472dd3a6f9972f4c2983115deec96193f9
push id26607
push userryanvm@gmail.com
push dateFri, 18 Apr 2014 02:31:26 +0000
treeherdermozilla-central@7fe3ee0cf8be [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs983489
milestone31.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 983489 - Crash on nsIAppStartup.quit() - application crashed [@ mozilla::gl::GLContext::MakeCurrent(bool)]. r=nical
gfx/layers/composite/LayerManagerComposite.cpp
gfx/layers/ipc/CompositorParent.cpp
--- a/gfx/layers/composite/LayerManagerComposite.cpp
+++ b/gfx/layers/composite/LayerManagerComposite.cpp
@@ -126,19 +126,16 @@ void
 LayerManagerComposite::Destroy()
 {
   if (!mDestroyed) {
     mCompositor->GetWidget()->CleanupWindowEffects();
     if (mRoot) {
       RootLayer()->Destroy();
     }
     mRoot = nullptr;
-
-    mCompositor->Destroy();
-
     mDestroyed = true;
   }
 }
 
 void
 LayerManagerComposite::UpdateRenderBounds(const nsIntRect& aRect)
 {
   mRenderBounds = aRect;
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -236,17 +236,19 @@ CompositorParent::~CompositorParent()
 void
 CompositorParent::Destroy()
 {
   NS_ABORT_IF_FALSE(ManagedPLayerTransactionParent().Length() == 0,
                     "CompositorParent destroyed before managed PLayerTransactionParent");
 
   // Ensure that the layer manager is destructed on the compositor thread.
   mLayerManager = nullptr;
+  mCompositor->Destroy();
   mCompositor = nullptr;
+
   mCompositionManager = nullptr;
   mApzcTreeManager->ClearTree();
   mApzcTreeManager = nullptr;
   sIndirectLayerTrees.erase(mRootLayerTreeID);
 }
 
 void
 CompositorParent::ForceIsFirstPaint()
@@ -268,17 +270,16 @@ CompositorParent::RecvWillStop()
       LayerTreeState* lts = &it->second;
       if (lts->mParent == this) {
         mLayerManager->ClearCachedResources(lts->mRoot);
         lts->mLayerManager = nullptr;
       }
     }
     mLayerManager->Destroy();
     mLayerManager = nullptr;
-    mCompositor = nullptr;
     mCompositionManager = nullptr;
   }
 
   return true;
 }
 
 bool
 CompositorParent::RecvStop()