-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
35 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters