| Summary: | Remove OriginStorageManager if it's not in use | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sihui Liu <sihui_liu> | ||||||||
| Component: | New Bugs | Assignee: | Sihui Liu <sihui_liu> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | cdumez, darin, webkit-bug-importer, youennf | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Sihui Liu
2022-02-02 10:38:41 PST
Created attachment 450674 [details]
Patch
Created attachment 450679 [details]
Patch
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. Created attachment 450705 [details]
Patch for landing
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]. |