Bug 925324. For abnormal shutdowns, only abort on b2g. r=sotaro
authorNicholas Cameron <ncameron@mozilla.com>
Fri, 11 Oct 2013 05:44:03 +1300
changeset 164192 d87155d486f064f26d46f76fa250041594160f76
parent 164191 ae540d172def716bb593db2e10ed32cb9e3353ba
child 164193 ffbc9ebb069990f2f49535f7f14ee0c45ad62f5a
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs925324
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 925324. For abnormal shutdowns, only abort on b2g. r=sotaro
gfx/layers/ipc/CompositorChild.cpp
gfx/layers/ipc/LayerTransactionChild.cpp
--- a/gfx/layers/ipc/CompositorChild.cpp
+++ b/gfx/layers/ipc/CompositorChild.cpp
@@ -96,19 +96,25 @@ CompositorChild::DeallocPLayerTransactio
   return true;
 }
 
 void
 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
   // cleanup, because that will cause it to be deleted while it's
   // still being used.  So defer the deletion to after it's not in
   // use.
   MessageLoop::current()->PostTask(
     FROM_HERE,
--- a/gfx/layers/ipc/LayerTransactionChild.cpp
+++ b/gfx/layers/ipc/LayerTransactionChild.cpp
@@ -80,15 +80,21 @@ LayerTransactionChild::DeallocPComposita
 {
   delete actor;
   return true;
 }
 
 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
 }  // namespace mozilla