Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 79064a2406194d4b20fdb42fd68e2271b63f9f61
      
https://github.com/WebKit/WebKit/commit/79064a2406194d4b20fdb42fd68e2271b63f9f61
  Author: Timothy Hatcher <[email protected]>
  Date:   2025-10-14 (Tue, 14 Oct 2025)

  Changed paths:
    M Source/WebKit/UIProcess/Extensions/API/WebExtensionContextAPIStorage.cpp
    M 
Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIActionCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIAction.mm

  Log Message:
  -----------
  Safari crashes on setting action icon path to null.
https://webkit.org/b/299460
rdar://problem/161264195

Reviewed by Brian Weinstein.

Add null checks for JSON::Value::parseJSON() uses. These were not fatal before 
in ObjC.
Add new tests for null in `action.setIcon()`. The other null checks were not 
testable.

Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIAction.mm
* Source/WebKit/UIProcess/Extensions/API/WebExtensionContextAPIStorage.cpp:
(WebKit::WebExtensionContext::storageSet):
(WebKit::WebExtensionContext::fireStorageChangedEventIfNeeded):
* 
Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIActionCocoa.mm:
(WebKit::WebExtensionContext::actionSetIcon):
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm:
(WebKit::WebExtensionAction::setIcons):
(WebKit::WebExtensionAction::setIconVariants):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIAction.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPIAction, SetIconWithNullPath)): Added.
(TestWebKitAPI::TEST(WKWebExtensionAPIAction, SetIconWithNullImageData)): Added.
(TestWebKitAPI::TEST(WKWebExtensionAPIAction, SetIconWithNullVariants)): Added.

Canonical link: https://commits.webkit.org/301489@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

Reply via email to