mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 890573 - Ignore webgl.disable-extensions for the chrome-only WEBGL_debug_renderer_info. r=jgilbert
This commit is contained in:
parent
1099294dcb
commit
ca8d229be9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user