Bug 1338639 - Handle the OpenSharedResource failure in SyncObjectD3D11::Init when device rest happened. r=dvander a=gchang
authorKevin Chen <kechen@mozilla.com>
Tue, 14 Feb 2017 01:59:00 +0100
changeset 378537 9599f3612a604852c5daac4ba4bca8887c73cccc
parent 378536 9320a74084557f6584db59ecf64a0c187bf12741
child 378538 c4dda37794c12e666b66fc72b570585657a1b1c7
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander, gchang
bugs1338639
milestone53.0a2
Bug 1338639 - Handle the OpenSharedResource failure in SyncObjectD3D11::Init when device rest happened. r=dvander a=gchang
gfx/layers/d3d11/TextureD3D11.cpp
--- a/gfx/layers/d3d11/TextureD3D11.cpp
+++ b/gfx/layers/d3d11/TextureD3D11.cpp
@@ -1215,16 +1215,18 @@ SyncObjectD3D11::Init()
     __uuidof(ID3D11Texture2D),
     (void**)(ID3D11Texture2D**)getter_AddRefs(mD3D11Texture));
   if (FAILED(hr) || !mD3D11Texture) {
     gfxCriticalNote << "Failed to OpenSharedResource for SyncObjectD3D11: " << hexa(hr);
     if (!CompositorBridgeChild::CompositorIsInGPUProcess() &&
         !DeviceManagerDx::Get()->HasDeviceReset())
     {
       gfxDevCrash(LogReason::D3D11FinalizeFrame) << "Without device reset: " << hexa(hr);
+    } else {
+      return false;
     }
   }
 
   hr = mD3D11Texture->QueryInterface(__uuidof(IDXGIKeyedMutex), getter_AddRefs(mKeyedMutex));
   if (FAILED(hr) || !mKeyedMutex) {
     // Leave both the critical error and MOZ_CRASH for now; the critical error lets
     // us "save" the hr value.  We will probably eventuall replace this with gfxDevCrash.
     gfxCriticalError() << "Failed to get KeyedMutex (2): " << hexa(hr);