<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#c17">Comment # 17</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:achristensen&#64;apple.com" title="Alex Christensen &lt;achristensen&#64;apple.com&gt;"> <span class="fn">Alex Christensen</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=299800&amp;action=diff" name="attach_299800" title="Patch">attachment 299800</a> <a href="attachment.cgi?id=299800&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt; Source/WebCore/dom/Document.cpp:5046
&gt; +    // Parser should have picked up all speculative preloads by now</span >

Is there a difference between a speculative preload and a preload?

<span class="quote">&gt; Source/WebCore/loader/LinkLoader.cpp:183
&gt;      linkRequest.setInitiator(&quot;link&quot;);
&gt; +    linkRequest.setIsLinkPreload();</span >

Do we really need another bool for this?  Can't we just check if the initiator is &quot;link&quot;?

<span class="quote">&gt; Source/WebCore/loader/LinkPreloadResourceClients.h:66
&gt; +            m_resource-&gt;cancelLoad();
&gt;              m_resource-&gt;removeClient(client);</span >

I think removing the client will cancel the load if this was the only client.  If it wasn't the only client, then something else has made the same request and we probably don't want to cancel the load for that other client, right?

<span class="quote">&gt; Source/WebCore/loader/cache/CachedResourceLoader.h:131
&gt; +    enum ClearPreloadsMode { ClearSpeculativePreloads, ClearAllPreloads };</span >

enum class

<span class="quote">&gt; Source/WebCore/loader/cache/CachedResourceRequest.cpp:48
&gt; +    , m_isLinkPreload(false)</span >

If we added a bool here, we would want to have its initializer be an initializer list in the header
bool m_isLinkPreload { false };</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>