Bug 925324. For abnormal shutdowns, only abort on b2g. r=sotaro

This commit is contained in:
Nicholas Cameron 2013-10-11 05:44:03 +13:00
parent 3f76c083c7
commit 29b7366422
2 changed files with 12 additions and 0 deletions

View File

@ -101,9 +101,15 @@ CompositorChild::ActorDestroy(ActorDestroyReason aWhy)
{
MOZ_ASSERT(sCompositor == this);
#ifdef MOZ_B2G
// Due to poor lifetime management of gralloc (and possibly shmems) we will
// crash at some point in the future when we get destroyed due to abnormal
// shutdown. Its better just to crash here. On desktop though, we have a chance
// of recovering.
if (aWhy == AbnormalShutdown) {
NS_RUNTIMEABORT("ActorDestroy by IPC channel failure at CompositorChild");
}
#endif
sCompositor = nullptr;
// We don't want to release the ref to sCompositor here, during

View File

@ -85,9 +85,15 @@ LayerTransactionChild::DeallocPCompositableChild(PCompositableChild* actor)
void
LayerTransactionChild::ActorDestroy(ActorDestroyReason why)
{
#ifdef MOZ_B2G
// Due to poor lifetime management of gralloc (and possibly shmems) we will
// crash at some point in the future when we get destroyed due to abnormal
// shutdown. Its better just to crash here. On desktop though, we have a chance
// of recovering.
if (why == AbnormalShutdown) {
NS_RUNTIMEABORT("ActorDestroy by IPC channel failure at LayerTransactionChild");
}
#endif
}
} // namespace layers