Bug 774388 - Patch 8: Avoid a deadlock between shutdown of CompositorParent and of CompositorThreadHolder - r=mattwoodrow

This commit is contained in:
Benoit Jacob 2014-07-03 14:53:29 -04:00
parent fc31fa9ac1
commit ed54a8ae99
2 changed files with 5 additions and 2 deletions

View File

@ -321,9 +321,10 @@ CompositorParent::RecvWillStop()
return true;
}
static void DeferredDeleteCompositorParentOnMainThread(CompositorParent* aNowReadyToDie)
void DeferredDeleteCompositorParentOnMainThread(CompositorParent* aNowReadyToDie)
{
MOZ_ASSERT(NS_IsMainThread());
aNowReadyToDie->mCompositorThreadHolder = nullptr;
aNowReadyToDie->Release();
}

View File

@ -311,9 +311,11 @@ protected:
nsRefPtr<APZCTreeManager> mApzcTreeManager;
const nsRefPtr<CompositorThreadHolder> mCompositorThreadHolder;
nsRefPtr<CompositorThreadHolder> mCompositorThreadHolder;
DISALLOW_EVIL_CONSTRUCTORS(CompositorParent);
friend void DeferredDeleteCompositorParentOnMainThread(CompositorParent* aNowReadyToDie);
};
} // layers