RESOLVED FIXED 167838
Fix memory issues related to preload eviction.
https://bugs.webkit.org/show_bug.cgi?id=167838
Summary Fix memory issues related to preload eviction.
Yoav Weiss
Reported 2017-02-04 11:52:03 PST
Fix memory issues related to preload eviction.
Attachments
Patch (2.16 KB, patch)
2017-02-04 11:55 PST, Yoav Weiss
no flags
Patch (2.31 KB, patch)
2017-02-04 12:00 PST, Yoav Weiss
no flags
Patch (2.32 KB, patch)
2017-02-04 12:56 PST, Yoav Weiss
no flags
Yoav Weiss
Comment 1 2017-02-04 11:55:30 PST
Yoav Weiss
Comment 2 2017-02-04 12:00:15 PST
Andreas Kling
Comment 3 2017-02-04 12:47:38 PST
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);
Yoav Weiss
Comment 4 2017-02-04 12:56:25 PST
Yoav Weiss
Comment 5 2017-02-04 13:04:24 PST
(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
WebKit Commit Bot
Comment 6 2017-02-04 13:42:01 PST
Comment on attachment 300637 [details] Patch Clearing flags on attachment: 300637 Committed r211673: <http://trac.webkit.org/changeset/211673>
WebKit Commit Bot
Comment 7 2017-02-04 13:42:06 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.