Bug 1337157 Disable WEBGL_debug_renderer_info when Resist Fingerprinting is active r?jgilbert draft
authorTom Ritter <tom@mozilla.com>
Mon, 26 Mar 2018 23:48:35 -0500
changeset 773591 acbe57cfdde0
parent 773590 4eeab2fcac2b
push id104259
push userbmo:tom@mozilla.com
push dateWed, 28 Mar 2018 04:49:37 +0000
reviewersjgilbert
bugs1337157
milestone61.0a1
Bug 1337157 Disable WEBGL_debug_renderer_info when Resist Fingerprinting is active r?jgilbert MozReview-Commit-ID: F7LCweFIPtM
dom/canvas/WebGLContextExtensions.cpp
--- a/dom/canvas/WebGLContextExtensions.cpp
+++ b/dom/canvas/WebGLContextExtensions.cpp
@@ -140,17 +140,18 @@ WebGLContext::IsExtensionSupported(WebGL
                !gl->IsANGLE();
     case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
         return gl->IsExtensionSupported(gl::GLContext::IMG_texture_compression_pvrtc);
     case WebGLExtensionID::WEBGL_compressed_texture_s3tc:
         return WebGLExtensionCompressedTextureS3TC::IsSupported(this);
     case WebGLExtensionID::WEBGL_compressed_texture_s3tc_srgb:
         return WebGLExtensionCompressedTextureS3TC_SRGB::IsSupported(this);
     case WebGLExtensionID::WEBGL_debug_renderer_info:
-        return Preferences::GetBool("webgl.enable-debug-renderer-info", false);
+        return Preferences::GetBool("webgl.enable-debug-renderer-info", false) &&
+               !nsContentUtils::ShouldResistFingerprinting();
     case WebGLExtensionID::WEBGL_debug_shaders:
         return !nsContentUtils::ShouldResistFingerprinting();
     case WebGLExtensionID::WEBGL_lose_context:
         // We always support this extension.
         return true;
 
     default:
         // For warnings-as-errors.