Summary: | When SpeculativeLoadManager is destroyed, properly clean up its PendingFrameLoads | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||
Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, cgarcia, darin, ews-watchlist, jacob_uphoff, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=210768 | ||||||||
Attachments: |
|
Description
Alex Christensen
2020-04-20 12:15:02 PDT
Created attachment 396999 [details]
Patch
Comment on attachment 396999 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=396999&action=review > Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:274 > + Vector<RefPtr<PendingFrameLoad>> pendingFrameLoads; > + pendingFrameLoads.reserveInitialCapacity(m_pendingFrameLoads.size()); > + for (auto& pendingFrameLoad : m_pendingFrameLoads.values()) > + pendingFrameLoads.uncheckedAppend(pendingFrameLoad); > + for (auto& pendingFrameLoad : pendingFrameLoads) { You should be able to write this instead and get exactly the same effect: for (auto& pendingFrameLoad : copyToVector(m_pendingFrameLoads.values())) Created attachment 397002 [details]
Patch
Comment on attachment 397002 [details]
Patch
Aha! That's the idiom I was looking for.
Committed r260390: <https://trac.webkit.org/changeset/260390> All reviewed patches have been landed. Closing bug and clearing flags on attachment 397002 [details]. *** Bug 210744 has been marked as a duplicate of this bug. *** Reverted in http://trac.webkit.org/r261405 |