Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(743)

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 1987413002: Add link preload as=document support Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: crash fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index 1d8a489187bf24ba71847999558509e59898b068..10f6537b910c422c16313e92e5069c65db638e7f 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -394,11 +394,11 @@ void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(unsigned long ide
dispatchDidFinishLoading(identifier, 0, 0);
}
-bool FrameFetchContext::shouldLoadNewResource(Resource::Type type) const
+bool FrameFetchContext::shouldLoadNewResource(Resource::Type type, const WebURLRequest::FrameType frameType) const
{
if (!m_documentLoader)
return true;
- if (type == Resource::MainResource)
+ if (type == Resource::MainResource && frameType != WebURLRequest::FrameTypePreload)
return m_documentLoader == frame()->loader().provisionalDocumentLoader();
return m_documentLoader == frame()->loader().documentLoader();
}
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.h ('k') | third_party/WebKit/Source/core/loader/LinkLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698