зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1122408 - Fix potential deadlock codepath. r=BenWa
This commit is contained in:
Родитель
dac4c08e5a
Коммит
2a521cc77c
|
@ -1249,6 +1249,7 @@ CompositorParent* CompositorParent::RemoveCompositor(uint64_t id)
|
|||
bool
|
||||
CompositorParent::RecvNotifyChildCreated(const uint64_t& child)
|
||||
{
|
||||
MonitorAutoLock lock(*sIndirectLayerTreesLock);
|
||||
NotifyChildCreated(child);
|
||||
return true;
|
||||
}
|
||||
|
@ -1256,7 +1257,7 @@ CompositorParent::RecvNotifyChildCreated(const uint64_t& child)
|
|||
void
|
||||
CompositorParent::NotifyChildCreated(const uint64_t& aChild)
|
||||
{
|
||||
MonitorAutoLock lock(*sIndirectLayerTreesLock);
|
||||
sIndirectLayerTreesLock->AssertCurrentThreadOwns();
|
||||
sIndirectLayerTrees[aChild].mParent = this;
|
||||
sIndirectLayerTrees[aChild].mLayerManager = mLayerManager;
|
||||
}
|
||||
|
@ -1264,8 +1265,8 @@ CompositorParent::NotifyChildCreated(const uint64_t& aChild)
|
|||
bool
|
||||
CompositorParent::RecvAdoptChild(const uint64_t& child)
|
||||
{
|
||||
NotifyChildCreated(child);
|
||||
MonitorAutoLock lock(*sIndirectLayerTreesLock);
|
||||
NotifyChildCreated(child);
|
||||
if (sIndirectLayerTrees[child].mLayerTree) {
|
||||
sIndirectLayerTrees[child].mLayerTree->mLayerManager = mLayerManager;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче