mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Issue #1354 - Clear the current context when MakeCurrent() fails.
This commit is contained in:
parent
8d600c51ed
commit
9d76eb5791
10 changed files with 81 additions and 95 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue