Bug 890573 - Ignore webgl.disable-extensions for the chrome-only WEBGL_debug_renderer_info. r=jgilbert

This commit is contained in:
David Cook 2013-07-09 09:09:15 -04:00
parent 1099294dcb
commit ca8d229be9

View File

@ -964,6 +964,19 @@ WebGLContext::MozGetUnderlyingParamString(uint32_t pname, nsAString& retval)
bool WebGLContext::IsExtensionSupported(JSContext *cx, WebGLExtensionID ext) const
{
// Chrome contexts need access to debug information even when
// webgl.disable-extensions is set. This is used in the graphics
// section of about:support.
if (xpc::AccessCheck::isChrome(js::GetContextCompartment(cx))) {
switch (ext) {
case WEBGL_debug_renderer_info:
return true;
default:
// For warnings-as-errors.
break;
}
}
if (mDisableExtensions) {
return false;
}
@ -1018,8 +1031,6 @@ bool WebGLContext::IsExtensionSupported(JSContext *cx, WebGLExtensionID ext) con
return true;
}
return false;
case WEBGL_debug_renderer_info:
return xpc::AccessCheck::isChrome(js::GetContextCompartment(cx));
default:
// For warnings-as-errors.
break;