Bug 1171682 - Disable WebGL in safemode. r=jgilbert

This commit is contained in:
Benoit Girard 2015-06-15 17:05:02 -04:00
parent 2e98c692ce
commit faa63dacd9

View File

@ -894,6 +894,10 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
NS_ENSURE_TRUE(Preferences::GetRootBranch(), NS_ERROR_FAILURE);
bool disabled = Preferences::GetBool("webgl.disabled", false);
// TODO: When we have software webgl support we should use that instead.
disabled |= gfxPlatform::InSafeMode();
if (disabled) {
GenerateWarning("WebGL creation is disabled, and so disallowed here.");
return NS_ERROR_FAILURE;