Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7aa77f71f5bc9b4b9798e17e2152c3829ff9582b
      
https://github.com/WebKit/WebKit/commit/7aa77f71f5bc9b4b9798e17e2152c3829ff9582b
  Author: Timothy Hatcher <[email protected]>
  Date:   2026-05-01 (Fri, 01 May 2026)

  Changed paths:
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtension.mm

  Log Message:
  -----------
  [macOS] ASSERTION FAILED: canProgrammaticallyPresentPopup() in 
TestWebKitAPI.WKWebExtension
https://webkit.org/b/313701
rdar://problem/175897544

Reviewed by Kiara Rose.

readyToPresentPopup() is called from delayed callbacks 
(performSelector:afterDelay:
for content size stabilization, and dispatch_after for the popover show 
timeout) that
can fire after the extension controller delegate has been torn down. Replace the
assertions with guard clauses that return early when the conditions are no 
longer met.

The presentsPopupWhenReady() check is placed before clearing 
m_presentsPopupWhenReady
so the popup can still be presented if a delegate is attached later.

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm:
(WebKit::WebExtensionAction::readyToPresentPopup):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtension.mm:
(TestWebKitAPI::TEST(WKWebExtension, LoadFromDirectory)):
(TestWebKitAPI::TEST(WKWebExtension, LoadFromChromeExtensionArchive)):

Canonical link: https://commits.webkit.org/312462@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to