Bug 1250418 - Remove the assertion check of mCanSend in CompositorChild::ActorDestroy, r?nical
MozReview-Commit-ID: L0VSy4cYglh
--- a/gfx/layers/ipc/CompositorChild.cpp
+++ b/gfx/layers/ipc/CompositorChild.cpp
@@ -390,28 +390,32 @@ CompositorChild::RecvClearCachedResource
child->ClearCachedResources();
}
return true;
}
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;
}
-#endif
MessageLoop::current()->PostTask(
FROM_HERE,
NewRunnableMethod(this, &CompositorChild::Release));
}
bool
CompositorChild::RecvSharedCompositorFrameMetrics(