[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:00:26 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=167415

--- Comment #17 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 299800
  --> https://bugs.webkit.org/attachment.cgi?id=299800
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?

> 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"?

> 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?

> Source/WebCore/loader/cache/CachedResourceLoader.h:131
> +    enum ClearPreloadsMode { ClearSpeculativePreloads, ClearAllPreloads };

enum class

> 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 };

-- 
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/602c5db6/attachment.html>


More information about the webkit-unassigned mailing list