Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a8076cd4346043611ad3d4a09d264f5a6af9f0e5
https://github.com/WebKit/WebKit/commit/a8076cd4346043611ad3d4a09d264f5a6af9f0e5
Author: Kimmo Kinnunen <[email protected]>
Date: 2022-12-14 (Wed, 14 Dec 2022)
Changed paths:
M LayoutTests/TestExpectations
A
LayoutTests/webgl/webgl-fail-platform-context-creation-no-crash-expected.txt
A LayoutTests/webgl/webgl-fail-platform-context-creation-no-crash.html
M Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml
M Source/WebCore/html/canvas/WebGLContextAttributes.idl
M Source/WebCore/platform/graphics/GraphicsContextGLAttributes.h
M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Tools/WebKitTestRunner/TestOptions.cpp
Log Message:
-----------
RemoteGraphicsContextGL crashes if platform graphics context creation fails
https://bugs.webkit.org/show_bug.cgi?id=249214
rdar://103277903
Reviewed by Matt Woodrow.
Creating GraphicsContextGL would fail if ANGLE shared library is not present.
This is as intended, on macOS this happens in recovery OS.
GPUP RemoteGraphicsContextGL would access nullptr when the unusable context
would be destroyed.
Guard for the nullptr context.
Move the IPC stream connection opening in the functions that execute on
stream work queue and start receiving messages from the stream only when
the context creation succeeds. This way the payload functions do not need
the nullptr guard, which they do not have.
* Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml:
* Source/WebCore/html/canvas/WebGLContextAttributes.idl:
* Source/WebCore/platform/graphics/GraphicsContextGLAttributes.h:
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::initialize):
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::initialize):
(WebKit::RemoteGraphicsContextGL::stopListeningForIPC):
(WebKit::RemoteGraphicsContextGL::workQueueInitialize):
(WebKit::RemoteGraphicsContextGL::workQueueUninitialize):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Tools/WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
Canonical link: https://commits.webkit.org/257843@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes