Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0c895f72ea62c68760daa412615d7d750c8d373a
https://github.com/WebKit/WebKit/commit/0c895f72ea62c68760daa412615d7d750c8d373a
Author: Lauro Moura <[email protected]>
Date: 2026-06-12 (Fri, 12 Jun 2026)
Changed paths:
M Source/WebCore/platform/graphics/skia/PlatformDisplaySkia.cpp
M
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp
Log Message:
-----------
[GTK][WPE] Fix crash in SkiaGLContext destructor when EGL is torn down during
process exit
https://bugs.webkit.org/show_bug.cgi?id=315115
Reviewed by Carlos Garcia Campos.
The ThreadedCompositor constructor allocates and passes to the
compositor thread a SkiaGLContext, but currently it does not clear such
context on the cleanup path (i.e. the invalidate() path).
This behavior may lead to crashes where the compositor thread might end
up accessing EGL resources that are already being torn down by EGL
atexit handlers from the main thread. For example, this seems to be
quite present in some high-churn scenarios like the WebDriver tests.
This commit fixes this by ensuring the compositor thread releases the
EGL context it holds in the invalidation path, mirroring the allocation
from the constructor.
* Source/WebCore/platform/graphics/skia/PlatformDisplaySkia.cpp:
(WebCore::PlatformDisplay::setSkiaGLContextForCurrentThread):
* Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::invalidate):
Canonical link: https://commits.webkit.org/315079@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications