diff --git a/gfx/layers/ipc/CompositorChild.cpp b/gfx/layers/ipc/CompositorChild.cpp index 1e102102f639..d11ca478bb8c 100644 --- a/gfx/layers/ipc/CompositorChild.cpp +++ b/gfx/layers/ipc/CompositorChild.cpp @@ -415,19 +415,23 @@ CompositorChild::RecvClearCachedResources(const uint64_t& aId) void CompositorChild::ActorDestroy(ActorDestroyReason aWhy) { - MOZ_ASSERT(!mCanSend); MOZ_ASSERT(sCompositor == this); + if (aWhy == AbnormalShutdown) { #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 + // If the parent side runs into a problem then the actor will be destroyed. + // There is nothing we can do in the child side, here sets mCanSend as false. + mCanSend = false; + gfxCriticalNote << "Receive IPC close with reason=" << aWhy; + } + MessageLoop::current()->PostTask( FROM_HERE, NewRunnableMethod(this, &CompositorChild::Release));