diff --git a/gfx/layers/ipc/CompositorChild.cpp b/gfx/layers/ipc/CompositorChild.cpp index 490f42ae882..d27dc04a36c 100644 --- a/gfx/layers/ipc/CompositorChild.cpp +++ b/gfx/layers/ipc/CompositorChild.cpp @@ -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 diff --git a/gfx/layers/ipc/LayerTransactionChild.cpp b/gfx/layers/ipc/LayerTransactionChild.cpp index 7c311980087..312a8549992 100644 --- a/gfx/layers/ipc/LayerTransactionChild.cpp +++ b/gfx/layers/ipc/LayerTransactionChild.cpp @@ -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