Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f1994d68f985424f788a88fe4f01cd2e45ed3f5d
https://github.com/WebKit/WebKit/commit/f1994d68f985424f788a88fe4f01cd2e45ed3f5d
Author: Timothy Hatcher <[email protected]>
Date: 2024-06-17 (Mon, 17 Jun 2024)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMessagePort.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMessagePort.mm
M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionMessagePortCocoa.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIRuntime.mm
Log Message:
-----------
Crash at com.apple.WebKit: -[_WKWebExtensionMessagePort
sendMessage:completionHandler:].
https://webkit.org/b/275589
rdar://129687779
Reviewed by Brian Weinstein.
We need to allow `nil` to be sent to `_WKWebExtensionMessagePort`, which will
be delivered as `undefined`.
This was the behavior in Safari 17, so we need to match to avoid breaking
extensions.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMessagePort.h: Added
nullable to sendMessage:completionHandler:.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMessagePort.mm:
(-[_WKWebExtensionMessagePort sendMessage:completionHandler:]): Removed
NSParameterAssert.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionMessagePortCocoa.mm:
(WebKit::WebExtensionMessagePort::sendMessage): Only call isValidJSONObject if
message is not null.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIRuntime.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPIRuntime, ConnectNative)): Removed
nullable attributes.
(TestWebKitAPI::TEST(WKWebExtensionAPIRuntime,
ConnectNativeWithInvalidMessage)): Ditto.
(TestWebKitAPI::TEST(WKWebExtensionAPIRuntime,
ConnectNativeWithUndefinedMessage)): Added.
Canonical link: https://commits.webkit.org/280107@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes