Bug 1337157 - Disable WEBGL_debug_renderer_info when Resist Fingerprinting is active. r=jgilbert, a=RyanVM
authorTom Ritter <tom@mozilla.com>
Mon, 26 Mar 2018 23:48:35 -0500
changeset 460496 d8c0fba8b94a
parent 460495 95e02bd6a13f
child 460497 8cf59abf9839
push id8959
push userryanvm@gmail.com
push dateMon, 02 Apr 2018 17:46:14 +0000
treeherdermozilla-beta@c31d3d320dbd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert, RyanVM
bugs1337157
milestone60.0
Bug 1337157 - Disable WEBGL_debug_renderer_info when Resist Fingerprinting is active. r=jgilbert, a=RyanVM 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.