Chromium Code Reviews| Index: third_party/WebKit/Source/core/loader/LinkLoader.cpp |
| diff --git a/third_party/WebKit/Source/core/loader/LinkLoader.cpp b/third_party/WebKit/Source/core/loader/LinkLoader.cpp |
| index f29cc5e5001c93c50a76763e732ea4d70e06ac93..bd85364ae4dadb15610746bdfc9f1245a0da5a18 100644 |
| --- a/third_party/WebKit/Source/core/loader/LinkLoader.cpp |
| +++ b/third_party/WebKit/Source/core/loader/LinkLoader.cpp |
| @@ -282,6 +282,9 @@ bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, CrossOriginAttri |
| if (m_client->shouldLoadLink()) |
| createLinkPreloadResourceClient(preloadIfNeeded(relAttribute, href, document, as, LinkCalledFromMarkup)); |
| + if (href.isEmpty() || !href.isValid()) |
| + released(); |
| + |
| // FIXME(crbug.com/323096): Should take care of import. |
| if ((relAttribute.isLinkPrefetch() || relAttribute.isLinkSubresource()) && href.isValid() && document.frame()) { |
| if (!m_client->shouldLoadLink()) |
| @@ -323,6 +326,8 @@ void LinkLoader::released() |
| m_prerender->cancel(); |
| m_prerender.clear(); |
| } |
| + if (m_linkPreloadResourceClient) |
| + m_linkPreloadResourceClient->clear(); |
|
Nate Chapin
2016/01/21 21:53:17
I had actually meant deleting the LinkPreloadResou
|
| } |
| DEFINE_TRACE(LinkLoader) |