RESOLVED FIXED 236029
Remove OriginStorageManager if it's not in use
https://bugs.webkit.org/show_bug.cgi?id=236029
Summary Remove OriginStorageManager if it's not in use
Sihui Liu
Reported 2022-02-02 10:38:41 PST
...
Attachments
Patch (5.66 KB, patch)
2022-02-02 10:47 PST, Sihui Liu
ews-feeder: commit-queue-
Patch (5.66 KB, patch)
2022-02-02 11:29 PST, Sihui Liu
no flags
Patch for landing (5.47 KB, patch)
2022-02-02 15:29 PST, Sihui Liu
no flags
Sihui Liu
Comment 1 2022-02-02 10:47:57 PST
Sihui Liu
Comment 2 2022-02-02 11:29:55 PST
Darin Adler
Comment 3 2022-02-02 13:53:00 PST
Comment on attachment 450679 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450679&action=review > Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:181 > + HashSet<WebCore::ClientOrigin> originsToRemove; > + for (auto& [origin, manager] : m_localOriginStorageManagers) { > + manager->connectionClosed(connection); > + if (!manager->isActive()) > + originsToRemove.add(origin); > + } > + > + for (auto origin : originsToRemove) > + m_localOriginStorageManagers.remove(origin); HashSet has a removeIf function that can do this sort of thing much more efficiently. We should use it here.
Sihui Liu
Comment 4 2022-02-02 15:29:35 PST
Created attachment 450705 [details] Patch for landing
EWS
Comment 5 2022-02-02 16:10:33 PST
Committed r289012 (246721@main): <https://commits.webkit.org/246721@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450705 [details].
Radar WebKit Bug Importer
Comment 6 2022-02-02 16:11:18 PST
Note You need to log in before you can comment on or make changes to this bug.