[Webkit-unassigned] [Bug 167415] Avoid evicting link preload resources when parsing is done.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 26 11:55:01 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=167415
--- Comment #18 from Yoav Weiss <yoav at yoav.ws> ---
(In reply to comment #17)
> Comment on attachment 299800 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=299800&action=review
>
> > Source/WebCore/dom/Document.cpp:5046
> > + // Parser should have picked up all speculative preloads by now
>
> Is there a difference between a speculative preload and a preload?
A speculative preload is one issued by the preloadScanner (at least that's the terminology that I used)
>
> > Source/WebCore/loader/LinkLoader.cpp:183
> > linkRequest.setInitiator("link");
> > + linkRequest.setIsLinkPreload();
>
> Do we really need another bool for this? Can't we just check if the
> initiator is "link"?
A "link" initiator can also be a stylesheet. A slightly similar flag is the ForPreload flag, which signified if a request and a resource were triggered as a speculative preload.
Maybe we can somehow unite those flags, but a 4 state enum is not necessarily better/clearer than two bools
>
> > Source/WebCore/loader/LinkPreloadResourceClients.h:66
> > + m_resource->cancelLoad();
> > m_resource->removeClient(client);
>
> 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?
I'll try that
>
> > Source/WebCore/loader/cache/CachedResourceLoader.h:131
> > + enum ClearPreloadsMode { ClearSpeculativePreloads, ClearAllPreloads };
>
> enum class
OK
>
> > Source/WebCore/loader/cache/CachedResourceRequest.cpp:48
> > + , m_isLinkPreload(false)
>
> If we added a bool here, we would want to have its initializer be an
> initializer list in the header
> bool m_isLinkPreload { false };
OK
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170126/4b148241/attachment.html>
More information about the webkit-unassigned
mailing list