Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5bf1b8f92e693edcb769f2935e864fa0a3752a96
      
https://github.com/WebKit/WebKit/commit/5bf1b8f92e693edcb769f2935e864fa0a3752a96
  Author: Timothy Hatcher <timo...@apple.com>
  Date:   2024-03-08 (Fri, 08 Mar 2024)

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

  Log Message:
  -----------
  Speed up WebExtensionContext::getCurrentTab().
https://webkit.org/b/270644
rdar://problem/124222506

Reviewed by Brian Weinstein.

Simplify the logic in getCurrentTab() by returning early if the page is
a know extension page, and IncludeExtensionViews::No. This prevents logging
an error "Tab for page XX was not found" and avoids looping through open tabs.

Also removed the deep nesting, and added gotos to skip to the end checks faster.

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

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to