Bug 1175521 - Posting to a dead loop. r=nical

This commit is contained in:
Milan Sreckovic 2015-06-17 10:33:00 -04:00
parent 7a10d4c5be
commit e75d563da7

View File

@ -1550,7 +1550,10 @@ CompositorParent::DeallocateLayerTreeId(uint64_t aId)
// Here main thread notifies compositor to remove an element from
// sIndirectLayerTrees. This removed element might be queried soon.
// Checking the elements of sIndirectLayerTrees exist or not before using.
MOZ_ASSERT(CompositorLoop());
if (!CompositorLoop()) {
gfxCriticalError() << "Attempting to post to a invalid Compositor Loop";
return;
}
CompositorLoop()->PostTask(FROM_HERE,
NewRunnableFunction(&EraseLayerState, aId));
}