From 29b736642228bec1fb8a259fd1dc7d4a3cffe6d7 Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Fri, 11 Oct 2013 05:44:03 +1300 Subject: [PATCH] Bug 925324. For abnormal shutdowns, only abort on b2g. r=sotaro --- gfx/layers/ipc/CompositorChild.cpp | 6 ++++++ gfx/layers/ipc/LayerTransactionChild.cpp | 6 ++++++ 2 files changed, 12 insertions(+) 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