Handle failed SendPImageContainerConstructor. (bug 1313770 part 3, r=mattwoodrow)
authorDavid Anderson <danderson@mozilla.com>
Fri, 28 Oct 2016 15:48:35 -0700
changeset 320095 a8e078e03894e144487e04d0eef507def1a0d50d
parent 320094 8c31adc3869b113b6917e621a75bf94ae338e3b1
child 320096 d2f30ab32eceb03b2e2d55aed36711c94f894c58
push id20749
push userryanvm@gmail.com
push dateSat, 29 Oct 2016 13:21:21 +0000
treeherderfx-team@1b170b39ed6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1313770
milestone52.0a1
Handle failed SendPImageContainerConstructor. (bug 1313770 part 3, r=mattwoodrow)
gfx/layers/ipc/ImageBridgeChild.cpp
--- a/gfx/layers/ipc/ImageBridgeChild.cpp
+++ b/gfx/layers/ipc/ImageBridgeChild.cpp
@@ -931,18 +931,20 @@ ImageBridgeChild::CreateImageClientNow(C
                                        ImageContainerChild* aContainerChild)
 {
   MOZ_ASSERT(InImageBridgeChildThread());
   if (!CanSend()) {
     return nullptr;
   }
 
   if (aImageContainer) {
-    SendPImageContainerConstructor(aContainerChild);
     aContainerChild->RegisterWithIPDL();
+    if (!SendPImageContainerConstructor(aContainerChild)) {
+      return nullptr;
+    }
   }
 
   RefPtr<ImageClient> client = ImageClient::CreateImageClient(aType, this, TextureFlags::NO_FLAGS);
   MOZ_ASSERT(client, "failed to create ImageClient");
   if (client) {
     client->Connect(aImageContainer);
   }
   return client;