<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Fix memory issues related to preload eviction."
href="https://bugs.webkit.org/show_bug.cgi?id=167838#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Fix memory issues related to preload eviction."
href="https://bugs.webkit.org/show_bug.cgi?id=167838">bug 167838</a>
from <span class="vcard"><a class="email" href="mailto:yoav@yoav.ws" title="Yoav Weiss <yoav@yoav.ws>"> <span class="fn">Yoav Weiss</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=167838#c3">comment #3</a>)
<span class="quote">> Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=300634&action=diff" name="attach_300634" title="Patch">attachment 300634</a> <a href="attachment.cgi?id=300634&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=300634&action=review">https://bugs.webkit.org/attachment.cgi?id=300634&action=review</a>
>
> 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);</span >
Good call. Changed as suggested</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>