Bug 999686 - Don't MOZ_CRASH in CompositableHost on bad IPC message params - r=sotaro
authorBenoit Jacob <bjacob@mozilla.com>
Wed, 23 Apr 2014 10:41:18 -0400
changeset 180220 6c4e8196edff0af43981a11f8a8cd2c82e6ddfa5
parent 180219 86119be8c527ca1385e3cbeb9644096bfdf207b6
child 180221 663c5751c29edc541b4341da15652de0fba60cd6
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewerssotaro
bugs999686
milestone31.0a1
Bug 999686 - Don't MOZ_CRASH in CompositableHost on bad IPC message params - r=sotaro
gfx/layers/composite/CompositableHost.cpp
--- a/gfx/layers/composite/CompositableHost.cpp
+++ b/gfx/layers/composite/CompositableHost.cpp
@@ -112,17 +112,17 @@ CompositableHost::RemoveMaskEffect()
 TemporaryRef<CompositableBackendSpecificData> CreateCompositableBackendSpecificDataOGL();
 
 /* static */ TemporaryRef<CompositableHost>
 CompositableHost::Create(const TextureInfo& aTextureInfo)
 {
   RefPtr<CompositableHost> result;
   switch (aTextureInfo.mCompositableType) {
   case BUFFER_BRIDGE:
-    MOZ_CRASH("Cannot create an image bridge compositable this way");
+    NS_ERROR("Cannot create an image bridge compositable this way");
     break;
   case BUFFER_CONTENT_INC:
     result = new ContentHostIncremental(aTextureInfo);
     break;
   case BUFFER_TILED:
   case BUFFER_SIMPLE_TILED:
     result = new TiledContentHost(aTextureInfo);
     break;
@@ -131,17 +131,17 @@ CompositableHost::Create(const TextureIn
     break;
   case COMPOSITABLE_CONTENT_SINGLE:
     result = new ContentHostSingleBuffered(aTextureInfo);
     break;
   case COMPOSITABLE_CONTENT_DOUBLE:
     result = new ContentHostDoubleBuffered(aTextureInfo);
     break;
   default:
-    MOZ_CRASH("Unknown CompositableType");
+    NS_ERROR("Unknown CompositableType");
   }
   // We know that Tiled buffers don't use the compositable backend-specific
   // data, so don't bother creating it.
   if (result && aTextureInfo.mCompositableType != BUFFER_TILED) {
     RefPtr<CompositableBackendSpecificData> data = CreateCompositableBackendSpecificDataOGL();
     result->SetCompositableBackendSpecificData(data);
   }
   return result;