<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Avoid evicting link preload resources when parsing is done."
   href="https://bugs.webkit.org/show_bug.cgi?id=167415#c20">Comment # 20</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Avoid evicting link preload resources when parsing is done."
   href="https://bugs.webkit.org/show_bug.cgi?id=167415">bug 167415</a>
              from <span class="vcard"><a class="email" href="mailto:youennf&#64;gmail.com" title="youenn fablet &lt;youennf&#64;gmail.com&gt;"> <span class="fn">youenn fablet</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=299837&amp;action=diff" name="attach_299837" title="Patch">attachment 299837</a> <a href="attachment.cgi?id=299837&amp;action=edit" title="Patch">[details]</a></span>
Patch

I guess an alternative would be to restrict m_preloads to speculative preloads only.
Can we do that?
Also, if we do not fully clean m_preloads at onload time, won't we keep references to these resources?
If so, we might not be able to reclaim memory on these, even if MemoryCache is asked to do so.

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=299837&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=299837&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/ChangeLog:14
&gt; +        being cleared), said issue is also fixed by clearing previousely preloaded resources if an invalid link preload is later detected.</span >

What happens if a speculative preload is scheduled first and a link preload on the same resource happens after.
Shouldn't the speculative preload be marked as link preload?

<span class="quote">&gt; Source/WebCore/loader/cache/CachedResourceLoader.cpp:870
&gt; +        resource-&gt;setLinkPreload();</span >

This should be done in CachedResource constructor.
Maybe we should in the future make CachedResource have a CachedResourceRequest member.</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>