summaryrefslogtreecommitdiffstats
path: root/dom/canvas/WebGLContextValidate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/WebGLContextValidate.cpp')
-rw-r--r--dom/canvas/WebGLContextValidate.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/dom/canvas/WebGLContextValidate.cpp b/dom/canvas/WebGLContextValidate.cpp
index ebf0aa8c2..30d4c6522 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.