Bug 1400073 - Hide MOZ_debug from getSupportedExtensions. - r=daoshengmu draft
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 14 Sep 2017 16:52:36 -0700
changeset 665130 2c8167739b824c8189636f9966704e23eea4feab
parent 665088 8e818b5e9b6bef0fc1a5c527ecf30b0d56a02f14
child 731664 517dc4e370c1e83c3b410a15ed28b3e97527bcde
push id79940
push userbmo:jgilbert@mozilla.com
push dateThu, 14 Sep 2017 23:52:47 +0000
reviewersdaoshengmu
bugs1400073
milestone57.0a1
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));
         }
     }
 
     /**