[webkit-changes] [WebKit/WebKit] 37b7a1: WebExtensionContext::openTabs() should only return...

kiaraarose noreply at github.com
Thu May 23 08:30:12 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 37b7a1c15d162636bf8ed3f38269e4fed3370878
      https://github.com/WebKit/WebKit/commit/37b7a1c15d162636bf8ed3f38269e4fed3370878
  Author: Kiara Rose <kiara_rose at apple.com>
  Date:   2024-05-23 (Thu, 23 May 2024)

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

  Log Message:
  -----------
  WebExtensionContext::openTabs() should only return tabs that are open
https://bugs.webkit.org/show_bug.cgi?id=274486
rdar://128285195

Reviewed by Timothy Hatcher.

Filter WebExtensionContext::openTabs() to only return tabs that are open.
Not having this check is a bug and adding this check should cause bugs like
rdar://128285195 to reproduce less since didOpenTab wouldn't have been called
for those tabs since they belong to a different profile.

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::openTabs const):

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionTabCocoa.mm:
(WebKit::WebExtensionTab::mainWebView() const):
Remove the THROW_UNLESS from here since throwing here doesn't give
us any indication of where the issue is occurring from the app.
A better place for this error would be in getOrCreateTab.

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



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


More information about the webkit-changes mailing list