Bug 632822. Hookup LayerManager ReportFailure to LogFailure. r=bas,a=ehsan
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 09 Feb 2011 14:28:39 -0500
changeset 62254 91635b0b00e140d215fee43e94c382498cd5a911
parent 62253 f03a3f52ea03efd4000f2f54cbb14bc4f03e9196
child 62263 3731800e5808f4bf7ff7f2effa0ee5a3b25c90bc
push idunknown
push userunknown
push dateunknown
reviewersbas, ehsan
bugs632822
milestone2.0b12pre
Bug 632822. Hookup LayerManager ReportFailure to LogFailure. r=bas,a=ehsan
gfx/layers/d3d10/LayerManagerD3D10.cpp
gfx/layers/d3d9/LayerManagerD3D9.cpp
--- a/gfx/layers/d3d10/LayerManagerD3D10.cpp
+++ b/gfx/layers/d3d10/LayerManagerD3D10.cpp
@@ -34,16 +34,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "LayerManagerD3D10.h"
 #include "LayerManagerD3D10Effect.h"
 #include "gfxWindowsPlatform.h"
 #include "gfxD2DSurface.h"
+#include "gfxFailure.h"
 #include "cairo-win32.h"
 #include "dxgi.h"
 
 #include "ContainerLayerD3D10.h"
 #include "ThebesLayerD3D10.h"
 #include "ColorLayerD3D10.h"
 #include "CanvasLayerD3D10.h"
 #include "ImageLayerD3D10.h"
@@ -577,16 +578,18 @@ void
 LayerManagerD3D10::ReportFailure(const nsACString &aMsg, HRESULT aCode)
 {
   // We could choose to abort here when hr == E_OUTOFMEMORY.
   nsCString msg;
   msg.Append(aMsg);
   msg.AppendLiteral(" Error code: ");
   msg.AppendInt(PRUint32(aCode));
   NS_WARNING(msg.BeginReading());
+
+  gfx::LogFailure(msg);
 }
 
 LayerD3D10::LayerD3D10(LayerManagerD3D10 *aManager)
   : mD3DManager(aManager)
 {
 }
 
 }
--- a/gfx/layers/d3d9/LayerManagerD3D9.cpp
+++ b/gfx/layers/d3d9/LayerManagerD3D9.cpp
@@ -42,16 +42,17 @@
 #include "ImageLayerD3D9.h"
 #include "ColorLayerD3D9.h"
 #include "CanvasLayerD3D9.h"
 #include "gfxWindowsPlatform.h"
 #include "nsIGfxInfo.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch2.h"
+#include "gfxFailure.h"
 
 namespace mozilla {
 namespace layers {
 
 DeviceManagerD3D9 *LayerManagerD3D9::mDefaultDeviceManager = nsnull;
 
 LayerManagerD3D9::LayerManagerD3D9(nsIWidget *aWidget)
   : mWidget(aWidget)
@@ -244,16 +245,18 @@ void
 LayerManagerD3D9::ReportFailure(const nsACString &aMsg, HRESULT aCode)
 {
   // We could choose to abort here when hr == E_OUTOFMEMORY.
   nsCString msg;
   msg.Append(aMsg);
   msg.AppendLiteral(" Error code: ");
   msg.AppendInt(PRUint32(aCode));
   NS_WARNING(msg.BeginReading());
+
+  gfx::LogFailure(msg);
 }
 
 void
 LayerManagerD3D9::Render()
 {
   if (!mSwapChain->PrepareForRendering()) {
     return;
   }