Bug 1416614 - Add checks to ImageBridgeParent::NotifyImageComposites r=nical
authorsotaro <sotaro.ikeda.g@gmail.com>
Wed, 15 Nov 2017 09:08:18 +0900
changeset 436276 db2a8ddbdb48edbc1a2b27296694f0bc1edb11e4
parent 436275 a6b0f77e29a25693e762c7c05ed64a38a3572355
child 436277 3328527cb7d5a4fc3df2abe1a613e13faaad364f
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewersnical
bugs1416614
milestone59.0a1
Bug 1416614 - Add checks to ImageBridgeParent::NotifyImageComposites r=nical
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;
 }