-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION (271259@main?): [ iOS Sonoma Debug arm64 ] TestWebKitAPI.W…
…KWebExtensionAPITabs.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
- Loading branch information
Showing
3 changed files
with
318 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.