Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d3b6be9ed4c39814076bb9729822fdfd87abe2f7 https://github.com/WebKit/WebKit/commit/d3b6be9ed4c39814076bb9729822fdfd87abe2f7 Author: Alex Christensen <achristen...@apple.com> Date: 2025-08-27 (Wed, 27 Aug 2025)
Changed paths: M LayoutTests/accessibility/deleting-iframe-destroys-axcache.html M Source/WebCore/page/WebKitJSHandle.cpp M Source/WebKit/UIProcess/API/C/WKPage.cpp M Source/WebKit/UIProcess/API/C/WKPage.h M Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp M Tools/WebKitTestRunner/InjectedBundle/TestRunner.h M Tools/WebKitTestRunner/TestController.cpp M Tools/WebKitTestRunner/TestController.h M Tools/WebKitTestRunner/TestInvocation.cpp M Tools/WebKitTestRunner/TestInvocation.h Log Message: ----------- Reduce use of cacheTestRunnerCallback even more https://bugs.webkit.org/show_bug.cgi?id=297738 rdar://158876977 Reviewed by Brady Eidson. This removes state in the injected bundle, which doesn't work with site isolation. In order to make this work without introducing flaky tests, I need to change the memory management of _WKJSHandle from a weak reference to a strong reference. Otherwise, a common pattern where the _WKJSHandle is the only thing pointing to a JSObject causes the object to be unable to be found when JavaScriptEvaluationResult::JSInserter::toJS comes along to use the _WKJSHandle. This memory management should be ok because when the API::JSHandle is destroyed, it tells the web process to drop the strong reference. In order to keep 3 tests working in the fast/page-color-sampling directory, I needed to make a function to call async JS without a simulated user interaction. Otherwise, Page::updateFixedContainerEdges would think the page had been interacted with since the last navigation and it wouldn't update the top edge color. * Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::nextUIScriptCallbackID): Deleted. (WTR::TestRunner::runUIScript): Deleted. (WTR::TestRunner::runUIScriptImmediately): Deleted. (WTR::TestRunner::runUIScriptCallback): Deleted. * Tools/WebKitTestRunner/InjectedBundle/TestRunner.h: * Tools/WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): (WTR::runUISideScriptImmediately): (WTR::TestController::uiScriptDidComplete): (WTR::if): (WTR::CompletionHandler<void): * Tools/WebKitTestRunner/TestController.h: * Tools/WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): (WTR::TestInvocation::uiScriptDidComplete): (WTR::TestInvocation::runUISideScriptImmediately): Deleted. (WTR::TestInvocation::runUISideScriptAfterUpdateCallback): Deleted. * Tools/WebKitTestRunner/TestInvocation.h: Canonical link: https://commits.webkit.org/299195@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes