Bug 1400073 - Hide MOZ_debug from getSupportedExtensions. - r=daoshengmu
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 14 Sep 2017 16:52:36 -0700
changeset 430570 3947ec46871535ef97a419fd6e4d891f796fa797
parent 430569 edd825dd3b1f017ca18b1eb50e2d439e02425240
child 430597 46f0b004bdd23afdf5201fc7801e81897cb7c349
push id7768
push userryanvm@gmail.com
push dateSat, 16 Sep 2017 16:13:49 +0000
treeherdermozilla-beta@3b375d85383a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaoshengmu
bugs1400073
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1400073 - Hide MOZ_debug from getSupportedExtensions. - r=daoshengmu MozReview-Commit-ID: LFTrUOGLh36
dom/canvas/WebGLContextExtensions.cpp
--- a/dom/canvas/WebGLContextExtensions.cpp
+++ b/dom/canvas/WebGLContextExtensions.cpp
@@ -461,17 +461,19 @@ WebGLContext::GetSupportedExtensions(dom
 {
     retval.SetNull();
     if (IsContextLost())
         return;
 
     nsTArray<nsString>& arr = retval.SetValue();
 
     for (size_t i = 0; i < size_t(WebGLExtensionID::Max); i++) {
-        WebGLExtensionID extension = WebGLExtensionID(i);
+        const auto extension = WebGLExtensionID(i);
+        if (extension == WebGLExtensionID::MOZ_debug)
+            continue; // Hide MOZ_debug from this list.
 
         if (IsExtensionSupported(callerType, extension)) {
             const char* extStr = GetExtensionString(extension);
             arr.AppendElement(NS_ConvertUTF8toUTF16(extStr));
         }
     }
 
     /**