Bug 1361825 - Clear mAnimationStorage in CompositorBridgeParent::StopAndClearResources(). r=pchang
MozReview-Commit-ID: XJdckUwXCx
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -487,16 +487,20 @@ CompositorBridgeParent::StopAndClearReso
// This must be destroyed now since it accesses the widget.
if (mCompositorScheduler) {
mCompositorScheduler->Destroy();
mCompositorScheduler = nullptr;
}
// After this point, it is no longer legal to access the widget.
mWidget = nullptr;
+
+ // Clear mAnimationStorage here to ensure that the compositor thread
+ // still exists when we destroy it.
+ mAnimationStorage = nullptr;
}
mozilla::ipc::IPCResult
CompositorBridgeParent::RecvWillClose()
{
StopAndClearResources();
return IPC_OK();
}
@@ -640,17 +644,16 @@ CompositorBridgeParent::RecvNotifyApprox
void
CompositorBridgeParent::ActorDestroy(ActorDestroyReason why)
{
StopAndClearResources();
RemoveCompositor(mCompositorID);
mCompositionManager = nullptr;
- mAnimationStorage = nullptr;
if (mApzcTreeManager) {
mApzcTreeManager->ClearTree();
mApzcTreeManager = nullptr;
}
{ // scope lock
MonitorAutoLock lock(*sIndirectLayerTreesLock);