Skip to content

Commit

Permalink
ASSERTION FAILED in ~GraphicsContextGLTextureMapperANGLE
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=249449

Reviewed by Kimmo Kinnunen.

WinCairo WK2 Debug was reporting an assertion failure for
webgl/webgl-fail-platform-context-creation-no-crash.html. The
assertion assumed makeContextCurrent() always succeeded. But, it's not
true. It should check the return value like Cocoa port does.

* Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLTextureMapperANGLE::~GraphicsContextGLTextureMapperANGLE):

Canonical link: https://commits.webkit.org/258021@main
  • Loading branch information
fujii committed Dec 16, 2022
1 parent b38081b commit 9de6806
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -52,8 +52,9 @@ GraphicsContextGLANGLE::GraphicsContextGLANGLE(GraphicsContextGLAttributes attri

GraphicsContextGLANGLE::~GraphicsContextGLANGLE()
{
bool success = makeContextCurrent();
ASSERT_UNUSED(success, success);
if (!makeContextCurrent())
return;

if (m_texture)
GL_DeleteTextures(1, &m_texture);

Expand Down Expand Up @@ -121,8 +122,8 @@ GraphicsContextGLTextureMapperANGLE::GraphicsContextGLTextureMapperANGLE(Graphic

GraphicsContextGLTextureMapperANGLE::~GraphicsContextGLTextureMapperANGLE()
{
bool success = makeContextCurrent();
ASSERT_UNUSED(success, success);
if (!makeContextCurrent())
return;

if (m_compositorTexture)
GL_DeleteTextures(1, &m_compositorTexture);
Expand Down

0 comments on commit 9de6806

Please sign in to comment.