Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 937a450286ead04a17b18f8991d2f04c2701e888
https://github.com/WebKit/WebKit/commit/937a450286ead04a17b18f8991d2f04c2701e888
Author: Charlie Wolfe <[email protected]>
Date: 2026-03-10 (Tue, 10 Mar 2026)
Changed paths:
M Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIMenusCocoa.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIMenus.mm
Log Message:
-----------
Crash in `Messages::WebExtensionContext::MenusRemove` completion after
background page reload
https://bugs.webkit.org/show_bug.cgi?id=309520
rdar://162005238
Reviewed by Timothy Hatcher.
The crash occurs when a non-persistent background page reloads and calls
menus.remove().
m_frameIdentifier will be empty, and is unconditionally dereferenced. We should
only send
RemoveListener when a click handler was actually removed.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIMenus.mm
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIMenusCocoa.mm:
(WebKit::WebExtensionAPIMenus::remove):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIMenus.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPIMenus, RemoveAfterBackgroundPageReload)):
Canonical link: https://commits.webkit.org/308964@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications