Skip to content
Browse files
Need to check the context wasn't lost in WebGL2RenderingContext::read…

Patch by Antoine Quint <> on 2022-06-09
Reviewed by Dean Jackson.

All other APIs exposed on WebGL2RenderingContext are guarded by isContextLostOrPending()
checks, and readBuffer() should be no exception.

* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:

Canonical link:
git-svn-id: 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
graouts authored and webkit-commit-queue committed Jun 9, 2022
1 parent e7e584e commit 4c12dfbd4dccf9425167f3a727d2e5444b872127
Showing 1 changed file with 3 additions and 0 deletions.
@@ -811,6 +811,9 @@ void WebGL2RenderingContext::invalidateSubFramebuffer(GCGLenum target, const Vec

void WebGL2RenderingContext::readBuffer(GCGLenum src)
if (isContextLostOrPending())

if (src == GraphicsContextGL::BACK) {
// Because the backbuffer is simulated on all current WebKit ports, we need to change BACK to COLOR_ATTACHMENT0.
if (m_readFramebufferBinding) {

0 comments on commit 4c12dfb

Please sign in to comment.