Bug 200985 - registrableDomainsToRemoveWebsiteDataFor() does not need to return a HashMap
Summary: registrableDomainsToRemoveWebsiteDataFor() does not need to return a HashMap
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-21 10:32 PDT by Chris Dumez
Modified: 2019-08-21 12:25 PDT (History)
10 users (show)

See Also:


Attachments
Patch (22.49 KB, patch)
2019-08-21 10:33 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-08-21 10:32:21 PDT
registrableDomainsToRemoveWebsiteDataFor() does not need to return a HashMap. It is more efficient to simply return a Vector since we never need to look up keys.
Comment 1 Chris Dumez 2019-08-21 10:33:20 PDT
Created attachment 376892 [details]
Patch
Comment 2 John Wilander 2019-08-21 10:49:14 PDT
Comment on attachment 376892 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=376892&action=review

I believe this has the side effect of allowing multiple entries for the same RegistrableDomain. That should be fine though, since even if we were to introduce such a bug, we would still delete the right data.

> Source/WTF/wtf/CrossThreadCopier.h:156
> +

Nice!
Comment 3 Chris Dumez 2019-08-21 11:41:17 PDT
Comment on attachment 376892 [details]
Patch

The Vector is populated from HashMaps of RegistrableDomains, I therefore do not think we can have duplicate RegistrableDomains in the Vector right now.
Comment 4 WebKit Commit Bot 2019-08-21 12:24:40 PDT
Comment on attachment 376892 [details]
Patch

Clearing flags on attachment: 376892

Committed r248956: <https://trac.webkit.org/changeset/248956>
Comment 5 WebKit Commit Bot 2019-08-21 12:24:41 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-08-21 12:25:18 PDT
<rdar://problem/54566740>