Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2be1403ca6cd4fae45d7d54e20cefd02de9d2c59
      
https://github.com/WebKit/WebKit/commit/2be1403ca6cd4fae45d7d54e20cefd02de9d2c59
  Author: Fujii Hironori <[email protected]>
  Date:   2026-05-17 (Sun, 17 May 2026)

  Changed paths:
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/html/OffscreenCanvas.cpp
    M Source/WebCore/html/OffscreenCanvas.h

  Log Message:
  -----------
  Keep alive OffscreenCanvas's wrapper object until webglcontextlost event is 
dispatched
https://bugs.webkit.org/show_bug.cgi?id=314269

Reviewed by Chris Dumez.

webgl/lose-context-after-context-lost.html randomly caused an assertion failure
for GTK and WPE.

> ASSERTION FAILED: m_wrapper
> Source/WebCore/bindings/js/JSEventListener.h(171) :
>     JSC::JSObject* 
> WebCore::JSEventListener::ensureJSFunction(WebCore::ScriptExecutionContext&) 
> const

OffscreenCanvas's wrapper object was reclaimed when the webglcontextlost event
was dispatched.

222794@main fixed the same issue for HTMLCanvasElement by adding
HTMLCanvasElement::virtualHasPendingActivity(). Do the same for
OffscreenCanvas.

Tests: webgl/lose-context-after-context-lost.html

* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::virtualHasPendingActivity const):
(WebCore::OffscreenCanvas::eventListenersDidChange):
* Source/WebCore/html/OffscreenCanvas.h:

Canonical link: https://commits.webkit.org/313384@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to