Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f4ad6ed72117bfdf3b96253cad3a94cc1e03e6da
https://github.com/WebKit/WebKit/commit/f4ad6ed72117bfdf3b96253cad3a94cc1e03e6da
Author: Alex Christensen <[email protected]>
Date: 2025-11-20 (Thu, 20 Nov 2025)
Changed paths:
M Source/WebCore/page/WebKitJSHandle.cpp
M Source/WebCore/page/WebKitJSHandle.h
M Source/WebKit/Shared/JavaScriptEvaluationResult.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/JSHandle.mm
Log Message:
-----------
Allow WebKitJSHandle to be sent to UI process multiple times
https://bugs.webkit.org/show_bug.cgi?id=302897
rdar://165162120
Reviewed by Wenson Hsieh.
300950@main fixed a lifetime issue with _WKJSHandle, but didn't quite do the
job.
This fixes another lifetime issue by actually using the refCount member to keep
track
of how many web and UI processes references to the same handle there are.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/JSHandle.mm
* Source/WebCore/page/WebKitJSHandle.cpp:
(WebCore::WebKitJSHandle::create):
(WebCore::WebKitJSHandle::~WebKitJSHandle):
(WebCore::WebKitJSHandle::jsHandleSentToAnotherProcess):
(WebCore::WebKitJSHandle::jsHandleDestroyed):
(WebCore::WebKitJSHandle::WebKitJSHandle):
(WebCore::globalObjectMap): Deleted.
* Source/WebCore/page/WebKitJSHandle.h:
(WebCore::WebKitJSHandle::identifier const): Deleted.
(WebCore::WebKitJSHandle::windowFrameIdentifier const): Deleted.
* Source/WebKit/Shared/JavaScriptEvaluationResult.cpp:
(WebKit::JavaScriptEvaluationResult::JSExtractor::jsValueToExtractedValue):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::hitTestAtPoint):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/JSHandle.mm:
(TestWebKitAPI::TEST(JSHandle, Reuse)):
Canonical link: https://commits.webkit.org/303366@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications