Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 26040f2c9126e8b0e6591aa69177c58d2f8c8ed3
      
https://github.com/WebKit/WebKit/commit/26040f2c9126e8b0e6591aa69177c58d2f8c8ed3
  Author: Timothy Hatcher <timo...@apple.com>
  Date:   2024-01-29 (Mon, 29 Jan 2024)

  Changed paths:
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionTabCocoa.mm
    M Source/WebKit/UIProcess/Extensions/WebExtensionTab.h

  Log Message:
  -----------
  Remove contains check for tabs and windows.
https://webkit.org/b/268342
rdar://problem/121887064

Reviewed by Brian Weinstein.

The "Window returned by windowForWebExtensionContext: does not contain the tab" 
exception is hard
to avoid when the tabs is being created, and not in a window yet. This 
exception is causing more
issues than is solves currently, so we should just remove it for now.

All existing code paths that use window() or index() properly check for nullptr 
or notFound.

Also adopt the fallbackAction() helper in a couple places I missed.

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm:
(WebKit::WebExtensionAction::hasUnreadBadgeText const): Use fallbackAction().
(WebKit::WebExtensionAction::setHasUnreadBadgeText): Ditto.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::didCloseTab): Stop using SkipContainsCheck::Yes.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionTabCocoa.mm:
(WebKit::WebExtensionTab::window const): Removed SkipContainsCheck param.
(WebKit::WebExtensionTab::index const): Remove contains check.
(WebKit::WebExtensionTab::isPrivate const): Stop using SkipContainsCheck::Yes.
* Source/WebKit/UIProcess/Extensions/WebExtensionTab.h:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to