Bug 1289813 - split out safe mode from FEATURE_FAILURE_WEBGL_DISABLED. r=jrmuizel
authorBenoit Girard <b56girard@gmail.com>
Fri, 29 Jul 2016 14:28:51 -0400
changeset 332493 3252e497b11121619545351a731f9b24885d5028
parent 332492 76de1a35ddb7c4ec9ec33adc97d3abb87ddb5c78
child 332494 d7ec7fcb18432a580e7a1581115d9e532e894a29
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1289813
milestone50.0a1
Bug 1289813 - split out safe mode from FEATURE_FAILURE_WEBGL_DISABLED. r=jrmuizel MozReview-Commit-ID: Jmp911jYjix
dom/canvas/WebGLContext.cpp
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -952,17 +952,21 @@ WebGLContext::SetDimensions(int32_t sign
     ++mGeneration;
 
     bool disabled = gfxPrefs::WebGLDisabled();
 
     // TODO: When we have software webgl support we should use that instead.
     disabled |= gfxPlatform::InSafeMode();
 
     if (disabled) {
-        failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_DISABLED");
+        if (gfxPlatform::InSafeMode()) {
+            failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_SAFEMODE");
+        } else {
+            failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_DISABLED");
+        }
         const nsLiteralCString text("WebGL is currently disabled.");
         ThrowEvent_WebGLContextCreationError(text);
         return NS_ERROR_FAILURE;
     }
 
     if (gfxPrefs::WebGLDisableFailIfMajorPerformanceCaveat()) {
         mOptions.failIfMajorPerformanceCaveat = false;
     }