-
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.
Cherry-pick 247ec3b. rdar://123959934
Create a faster cache of _WKWebExtensionTabs https://bugs.webkit.org/show_bug.cgi?id=270488 rdar://123959934 Reviewed by Timothy Hatcher. Instead of iterating over all of the tabs in m_tabMap and checking to see if their delegates match, create a new data structure that is a map table from the delegate to the identifier. This way, we can just do one O(1) lookup instead of an O(n) iteration. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::WebExtensionContext): (WebKit::WebExtensionContext::getOrCreateTab const): (WebKit::WebExtensionContext::forgetTab const): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: Canonical link: https://commits.webkit.org/275692@main
- Loading branch information
1 parent
adf1129
commit 6a8dcd2
Showing
2 changed files
with
20 additions
and
5 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
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