<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add a warning for unused link preloads."
   href="https://bugs.webkit.org/show_bug.cgi?id=165670#c24">Comment # 24</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add a warning for unused link preloads."
   href="https://bugs.webkit.org/show_bug.cgi?id=165670">bug 165670</a>
              from <span class="vcard"><a class="email" href="mailto:yoav&#64;yoav.ws" title="Yoav Weiss &lt;yoav&#64;yoav.ws&gt;"> <span class="fn">Yoav Weiss</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=165670#c23">comment #23</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=304495&amp;action=diff" name="attach_304495" title="Patch">attachment 304495</a> <a href="attachment.cgi?id=304495&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=304495&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=304495&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebCore/loader/cache/CachedResourceClient.h:48
&gt; &gt; +    virtual bool markAsReferenced() const { return true; }
&gt; 
&gt; I'm not sure this is named correctly.  shouldMarkAsReferenced?</span >

Yeah, I'll rename

<span class="quote">&gt; Isn't there already a way to tell if a load is a preload?</span >

There is already a way to tell if a certain request is a preload request or a preloaded resource.
However, a preloaded resource can be referenced (e.g. `&lt;link rel=preload href=foo as=script&gt;&lt;script src=foo&gt;`).
Current tracking if a resource is referenced is based on the addition of CachedResourceClients to it. So I figured it'd be cleanest to add that &quot;is this referencing&quot; info to the resource client.

<span class="quote">&gt; 
&gt; &gt; LayoutTests/TestExpectations:1260
&gt; &gt; +http/tests/preload/single_download_preload.html [ DumpJSConsoleLogInStdErr ]
&gt; 
&gt; Does this make these tests not accidentally print out a warning message?</span >

Yeah

<span class="quote">&gt; Is there no way to do this from within the test?</span >

Don't know. If there is, I'd be happy to switch to that method</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>