diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf index 12083c7e7160..4dca7531a5c8 100644 --- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -1272,8 +1272,8 @@ DOMInterfaces = { 'headerFile': 'WebGLExtensions.h' }, -'MOZ_debug': { - 'nativeType': 'mozilla::WebGLExtensionMOZDebug', +'MOZ_debug_get': { + 'nativeType': 'mozilla::WebGLExtensionDebugGet', 'headerFile': 'WebGLExtensions.h' }, diff --git a/dom/canvas/WebGLContextExtensions.cpp b/dom/canvas/WebGLContextExtensions.cpp index 1d5b7a58357e..21a8ea284733 100644 --- a/dom/canvas/WebGLContextExtensions.cpp +++ b/dom/canvas/WebGLContextExtensions.cpp @@ -40,7 +40,7 @@ WebGLContext::GetExtensionString(WebGLExtensionID ext) WEBGL_EXTENSION_IDENTIFIER(EXT_sRGB) WEBGL_EXTENSION_IDENTIFIER(EXT_texture_filter_anisotropic) WEBGL_EXTENSION_IDENTIFIER(EXT_disjoint_timer_query) - WEBGL_EXTENSION_IDENTIFIER(MOZ_debug) + WEBGL_EXTENSION_IDENTIFIER(MOZ_debug_get) WEBGL_EXTENSION_IDENTIFIER(OES_element_index_uint) WEBGL_EXTENSION_IDENTIFIER(OES_standard_derivatives) WEBGL_EXTENSION_IDENTIFIER(OES_texture_float) @@ -91,7 +91,7 @@ bool WebGLContext::IsExtensionSupported(dom::CallerType callerType, if (allowPrivilegedExts) { switch (ext) { - case WebGLExtensionID::MOZ_debug: + case WebGLExtensionID::MOZ_debug_get: return true; case WebGLExtensionID::WEBGL_debug_renderer_info: return true; @@ -381,8 +381,8 @@ WebGLContext::EnableExtension(WebGLExtensionID ext) break; // MOZ_ - case WebGLExtensionID::MOZ_debug: - obj = new WebGLExtensionMOZDebug(this); + case WebGLExtensionID::MOZ_debug_get: + obj = new WebGLExtensionDebugGet(this); break; // OES_ diff --git a/dom/canvas/WebGLExtensionMOZDebug.cpp b/dom/canvas/WebGLExtensionDebugGet.cpp similarity index 86% rename from dom/canvas/WebGLExtensionMOZDebug.cpp rename to dom/canvas/WebGLExtensionDebugGet.cpp index 4cf46c821875..39bb3c57a264 100644 --- a/dom/canvas/WebGLExtensionMOZDebug.cpp +++ b/dom/canvas/WebGLExtensionDebugGet.cpp @@ -6,23 +6,22 @@ #include "WebGLExtensions.h" #include "mozilla/dom/WebGLRenderingContextBinding.h" -#include "GLContext.h" #include "WebGLContext.h" #include "WebGLContextUtils.h" namespace mozilla { -WebGLExtensionMOZDebug::WebGLExtensionMOZDebug(WebGLContext* webgl) +WebGLExtensionDebugGet::WebGLExtensionDebugGet(WebGLContext* webgl) : WebGLExtensionBase(webgl) { } -WebGLExtensionMOZDebug::~WebGLExtensionMOZDebug() +WebGLExtensionDebugGet::~WebGLExtensionDebugGet() { } void -WebGLExtensionMOZDebug::GetParameter(JSContext* cx, GLenum pname, +WebGLExtensionDebugGet::GetParameter(JSContext* cx, GLenum pname, JS::MutableHandle retval, ErrorResult& er) const { @@ -69,12 +68,12 @@ WebGLExtensionMOZDebug::GetParameter(JSContext* cx, GLenum pname, } default: - mContext->ErrorInvalidEnumArg("MOZ_debug.getParameter", "pname", pname); + mContext->ErrorInvalidEnumArg("MOZ_debug_get.getParameter", "pname", pname); retval.set(JS::NullValue()); return; } } -IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionMOZDebug, MOZ_debug) +IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDebugGet, MOZ_debug_get) } // namespace mozilla diff --git a/dom/canvas/WebGLExtensions.h b/dom/canvas/WebGLExtensions.h index 00e6209de5c9..7e258a831f92 100644 --- a/dom/canvas/WebGLExtensions.h +++ b/dom/canvas/WebGLExtensions.h @@ -404,12 +404,12 @@ public: DECL_WEBGL_EXTENSION_GOOP }; -class WebGLExtensionMOZDebug final +class WebGLExtensionDebugGet final : public WebGLExtensionBase { public: - explicit WebGLExtensionMOZDebug(WebGLContext* webgl); - virtual ~WebGLExtensionMOZDebug(); + explicit WebGLExtensionDebugGet(WebGLContext* webgl); + virtual ~WebGLExtensionDebugGet(); void GetParameter(JSContext* cx, GLenum pname, JS::MutableHandle retval, ErrorResult& er) const; diff --git a/dom/canvas/WebGLTypes.h b/dom/canvas/WebGLTypes.h index 0dca4ecd65b8..ac6145bf6f4b 100644 --- a/dom/canvas/WebGLTypes.h +++ b/dom/canvas/WebGLTypes.h @@ -149,7 +149,7 @@ enum class WebGLExtensionID : uint8_t { EXT_shader_texture_lod, EXT_texture_filter_anisotropic, EXT_disjoint_timer_query, - MOZ_debug, + MOZ_debug_get, OES_element_index_uint, OES_standard_derivatives, OES_texture_float, diff --git a/dom/canvas/moz.build b/dom/canvas/moz.build index 98b2442f4a25..fa2315356c8e 100644 --- a/dom/canvas/moz.build +++ b/dom/canvas/moz.build @@ -135,6 +135,7 @@ UNIFIED_SOURCES += [ 'WebGLExtensionCompressedTextureETC1.cpp', 'WebGLExtensionCompressedTexturePVRTC.cpp', 'WebGLExtensionCompressedTextureS3TC.cpp', + 'WebGLExtensionDebugGet.cpp', 'WebGLExtensionDebugRendererInfo.cpp', 'WebGLExtensionDebugShaders.cpp', 'WebGLExtensionDepthTexture.cpp', @@ -145,7 +146,6 @@ UNIFIED_SOURCES += [ 'WebGLExtensionFragDepth.cpp', 'WebGLExtensionInstancedArrays.cpp', 'WebGLExtensionLoseContext.cpp', - 'WebGLExtensionMOZDebug.cpp', 'WebGLExtensionShaderTextureLod.cpp', 'WebGLExtensionSRGB.cpp', 'WebGLExtensionStandardDerivatives.cpp', diff --git a/dom/webidl/WebGLRenderingContext.webidl b/dom/webidl/WebGLRenderingContext.webidl index 854075ae018f..d590a84e2a3e 100644 --- a/dom/webidl/WebGLRenderingContext.webidl +++ b/dom/webidl/WebGLRenderingContext.webidl @@ -1085,7 +1085,7 @@ interface EXT_disjoint_timer_query { }; [NoInterfaceObject] -interface MOZ_debug { +interface MOZ_debug_get { const GLenum EXTENSIONS = 0x1F03; const GLenum WSI_INFO = 0x10000; diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index a3200dd99f62..ad9d72b3bc90 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -494,7 +494,7 @@ var dataProviders = { // // - let ext = gl.getExtension("MOZ_debug"); + let ext = gl.getExtension("MOZ_debug_get"); // This extension is unconditionally available to chrome. No need to check. let vendor = ext.getParameter(gl.VENDOR); let renderer = ext.getParameter(gl.RENDERER);