diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-22 11:49:38 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-22 11:51:19 +0100 |
commit | 5a6059feef9d2c7837afa3f87a2a9bfed345bb9d (patch) | |
tree | 2dae570a2f1bbaecc250b0f2b67c80e936c3b945 /dom | |
parent | 8e33fa9c4b5e4fb3ddfa11b7722cc74df3f94eca (diff) | |
parent | fabe21d593bd09e50ffc9932b074305f15d5409a (diff) | |
download | uxp-5a6059feef9d2c7837afa3f87a2a9bfed345bb9d.tar.gz |
Issue #1354 - Fix another potential crashing scenario in WebGL.
(merge of gl-work branch)
Diffstat (limited to 'dom')
-rw-r--r-- | dom/canvas/WebGLContextValidate.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dom/canvas/WebGLContextValidate.cpp b/dom/canvas/WebGLContextValidate.cpp index ebf0aa8c2d..30d4c65221 100644 --- a/dom/canvas/WebGLContextValidate.cpp +++ b/dom/canvas/WebGLContextValidate.cpp @@ -440,6 +440,13 @@ WebGLContext::InitAndValidateGL(FailureReason* const out_failReason) { MOZ_RELEASE_ASSERT(gl, "GFX: GL not initialized"); + if (!gl->MakeCurrent(true)) { + MOZ_ASSERT(false); + *out_failReason = { "FEATURE_FAILURE_WEBGL_MAKECURRENT", + "Failed to MakeCurrent for init." }; + return false; + } + // Unconditionally create a new format usage authority. This is // important when restoring contexts and extensions need to add // formats back into the authority. |