Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dda1770b178be44f1b8cfb9c1e4caed3aa516ce2
https://github.com/WebKit/WebKit/commit/dda1770b178be44f1b8cfb9c1e4caed3aa516ce2
Author: Brent Fulgham <[email protected]>
Date: 2026-05-05 (Tue, 05 May 2026)
Changed paths:
M Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp
M Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UserContentController.mm
Log Message:
-----------
Make sure the JS context is locked before calling methods on it to avoid
debug assertions
https://bugs.webkit.org/show_bug.cgi?id=314032
<rdar://problem/173871861>
Reviewed by Chris Dumez.
The JSC team identified that some IPC completion handlers in the WebProcess
touch JSC
objects without holding the JSLock. This causes assertion failures in Debug
builds when
the JSC heap allocator checks vm.currentThreadIsHoldingAPILock().
The changes are related to a new off-by-default API (WKJSSerializedNode).
I noticed this mistake was made in the WebInspector adoption of the new API,
and corrected
that call site as well.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UserContentController.mm
* Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp:
(WebKit::WebInspectorUIExtensionController::evaluateScriptInExtensionTab): Add
missing JSLock.
* Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UserContentController.mm:
(-[SerializedNodeReplyHandler
userContentController:didReceiveScriptMessage:replyHandler:]):
(TEST(WKUserContentController, MessageHandlerReplyWithSerializedNode)): Added.
Canonical link: https://commits.webkit.org/312630@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications