<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@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=165670#c23">comment #23</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=304495&action=diff" name="attach_304495" title="Patch">attachment 304495</a> <a href="attachment.cgi?id=304495&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=304495&action=review">https://bugs.webkit.org/attachment.cgi?id=304495&action=review</a>
>
> > Source/WebCore/loader/cache/CachedResourceClient.h:48
> > + virtual bool markAsReferenced() const { return true; }
>
> I'm not sure this is named correctly. shouldMarkAsReferenced?</span >
Yeah, I'll rename
<span class="quote">> 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. `<link rel=preload href=foo as=script><script src=foo>`).
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 "is this referencing" info to the resource client.
<span class="quote">>
> > LayoutTests/TestExpectations:1260
> > +http/tests/preload/single_download_preload.html [ DumpJSConsoleLogInStdErr ]
>
> Does this make these tests not accidentally print out a warning message?</span >
Yeah
<span class="quote">> 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>