Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 153a7995798830acddfc99d26d0a087a5f3de1fa
https://github.com/WebKit/WebKit/commit/153a7995798830acddfc99d26d0a087a5f3de1fa
Author: Timothy Hatcher <[email protected]>
Date: 2024-02-07 (Wed, 07 Feb 2024)
Changed paths:
M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm
M Source/WebKit/UIProcess/Extensions/WebExtensionAction.h
Log Message:
-----------
Crash at com.apple.WebKit: WebKit::WebExtensionController::wrapper().
https://webkit.org/b/268943
rdar://122480360
Reviewed by Brian Weinstein.
Add null checks for the extension controller, since the extension context
might not be loaded yet, or has since unloaded.
Also we can't cache if the delegate responds to the present method, since
the extension controller can change or the delegate can change. Also check
immediately before it is used.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm:
(WebKit::WebExtensionAction::WebExtensionAction): Don't cache the responds
result.
(WebKit::WebExtensionAction::fallbackAction const): Add null check for
consistency.
(WebKit::WebExtensionAction::canProgrammaticallyPresentPopup const): Added.
(WebKit::WebExtensionAction::presentPopupWhenReady): Check
canProgrammaticallyPresentPopup().
(WebKit::WebExtensionAction::readyToPresentPopup): Check delegate and null
check controller.
* Source/WebKit/UIProcess/Extensions/WebExtensionAction.h:
Canonical link: https://commits.webkit.org/274251@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes