Bug 1416614 - Add checks to ImageBridgeParent::NotifyImageComposites. r=nical, a=gchang
authorsotaro <sotaro.ikeda.g@gmail.com>
Wed, 15 Nov 2017 09:08:18 +0900
changeset 444803 3221f428493e488068dc664e4752fef0b60edef3
parent 444802 def7425b015c089ae7bd193bef7bac4a45074baf
child 444804 fb8050fb78aa4117614f8fa14de10cf08876e4f3
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical, gchang
bugs1416614
milestone58.0
Bug 1416614 - Add checks to ImageBridgeParent::NotifyImageComposites. r=nical, a=gchang
gfx/layers/ipc/ImageBridgeParent.cpp
--- a/gfx/layers/ipc/ImageBridgeParent.cpp
+++ b/gfx/layers/ipc/ImageBridgeParent.cpp
@@ -384,16 +384,19 @@ ImageBridgeParent::NotifyImageComposites
     MOZ_ASSERT(aNotifications[i].mNotification.compositable());
     ProcessId pid = aNotifications[i].mImageBridgeProcessId;
     while (end < aNotifications.Length() &&
            aNotifications[end].mImageBridgeProcessId == pid) {
       notifications.AppendElement(aNotifications[end].mNotification);
       ++end;
     }
     RefPtr<ImageBridgeParent> bridge = GetInstance(pid);
+    if (!bridge || bridge->mClosed) {
+      continue;
+    }
     bridge->SendPendingAsyncMessages();
     if (!bridge->SendDidComposite(notifications)) {
       ok = false;
     }
     i = end;
   }
   return ok;
 }