[webkit-changes] [WebKit/WebKit] fdd1ff: REGRESSION (271259 at main?): [ iOS Sonoma Debug arm6...

Timothy Hatcher noreply at github.com
Mon Dec 18 13:24:21 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fdd1ff775c0c2b996e545ddf82b564f31c575227
      https://github.com/WebKit/WebKit/commit/fdd1ff775c0c2b996e545ddf82b564f31c575227
  Author: Timothy Hatcher <timothy at apple.com>
  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 at 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 at 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




More information about the webkit-changes mailing list