Fix memory issues related to preload eviction.
Created attachment 300633 [details] Patch
Created attachment 300634 [details] Patch
Comment on attachment 300634 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=300634&action=review r=me, thanks for the quick turnaround :) > Source/WebCore/loader/cache/CachedResourceLoader.cpp:1274 > + if (linkPreloads && linkPreloads->size()) > + m_preloads = WTFMove(linkPreloads); > + else > m_preloads = nullptr; I think linkPreloads->size() is guaranteed to be >= 1 here, since you only allocate it when actually adding something. I would suggest renaming it to remainingLinkPreloads, and then replacing this block with simply: m_preloads = WTFMove(remainingLinkPreloads);
Created attachment 300637 [details] Patch
(In reply to comment #3) > Comment on attachment 300634 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=300634&action=review > > r=me, thanks for the quick turnaround :) > > > Source/WebCore/loader/cache/CachedResourceLoader.cpp:1274 > > + if (linkPreloads && linkPreloads->size()) > > + m_preloads = WTFMove(linkPreloads); > > + else > > m_preloads = nullptr; > > I think linkPreloads->size() is guaranteed to be >= 1 here, since you only > allocate it when actually adding something. > I would suggest renaming it to remainingLinkPreloads, and then replacing > this block with simply: > m_preloads = WTFMove(remainingLinkPreloads); Good call. Changed as suggested
Comment on attachment 300637 [details] Patch Clearing flags on attachment: 300637 Committed r211673: <http://trac.webkit.org/changeset/211673>
All reviewed patches have been landed. Closing bug.