Bug 1265282 - Annotate reports instead of crashing when setting an incompatible compositor (D3D11). r=dvander
authorNicolas Silva <nsilva@mozilla.com>
Thu, 21 Apr 2016 18:12:19 +0200
changeset 332219 5971412d4d7c14884ebade15f021c44f53fb7f1e
parent 332218 bcda23d0f3caf10c6a5433c632ae8314a692d0fb
child 332220 d65b7e80b494915e5a07bb8d4b5104688677c565
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1265282
milestone48.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 1265282 - Annotate reports instead of crashing when setting an incompatible compositor (D3D11). r=dvander
gfx/layers/d3d11/TextureD3D11.cpp
--- a/gfx/layers/d3d11/TextureD3D11.cpp
+++ b/gfx/layers/d3d11/TextureD3D11.cpp
@@ -637,17 +637,19 @@ DXGITextureHostD3D11::GetDevice()
   gfxWindowsPlatform::GetPlatform()->GetD3D11Device(&device);
   return device;
 }
 
 static CompositorD3D11* AssertD3D11Compositor(Compositor* aCompositor)
 {
   CompositorD3D11* compositor = aCompositor ? aCompositor->AsCompositorD3D11()
                                             : nullptr;
-  MOZ_DIAGNOSTIC_ASSERT(!!compositor);
+  if (!compositor) {
+    gfxCriticalNote << "[D3D11] Attempt to set an incompatible compositor";
+  }
   return compositor;
 }
 
 void
 DXGITextureHostD3D11::SetCompositor(Compositor* aCompositor)
 {
   CompositorD3D11* d3dCompositor = AssertD3D11Compositor(aCompositor);
   if (!d3dCompositor) {