Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fdd1ff775c0c2b996e545ddf82b564f31c575227
https://github.com/WebKit/WebKit/commit/fdd1ff775c0c2b996e545ddf82b564f31c575227
Author: Timothy Hatcher <[email protected]>
Date: 2023-12-18 (Mon, 18 Dec 2023)
Changed paths:
M
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIRuntimeCocoa.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIRuntime.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPITabs.mm
Log Message:
-----------
REGRESSION (271259@main?): [ iOS Sonoma Debug arm64 ]
TestWebKitAPI.WKWebExtensionAPITabs.SendMessageWithPromiseReply timeout
https://webkit.org/b/266518
rdar://problem/119740501
Reviewed by Brian Weinstein.
Adopt EagerCallbackAggregator for the reply handler. This was added on the
UIProcess side
for the message sending in 271636@main. It can also be used here, with the help
of an ObjC
wrapper object that can keep the aggregator in scope for the required blocks.
We can't use BlockPtr for these since the JSValue ObjC translation requires
blocks to have
a signature to translate them into JavaScript functions, which is only for
compiled blocks.
Without this, the aggregator falls out of scope and is released.
Added additional tests to make sure async replies work in addition to sync
replies. Also
adopted optional chaining for some tests since an exception is thrown when
response is null.
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIRuntimeCocoa.mm:
(-[_WKReplyCallbackAggregator initWithAggregator:]): Added.
(-[_WKReplyCallbackAggregator aggregator]): Added.
(WebKit::WebExtensionContextProxy::internalDispatchRuntimeMessageEvent):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIRuntime.mm:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPITabs.mm:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/272236@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes