Bug 1171682 - Disable WebGL in safemode. r=jgilbert

This commit is contained in:
Benoit Girard 2015-06-15 17:05:02 -04:00
Родитель f134c090a5
Коммит 5215ca7222
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

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