Bug 1400073 - Hide MOZ_debug from getSupportedExtensions. - r=daoshengmu
MozReview-Commit-ID: LFTrUOGLh36
--- 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));
}
}
/**