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

Unified Diff: Source/core/html/parser/HTMLResourcePreloader.cpp

Issue 104943004: Have preloader handle crossorigin resources better. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Initialize m_allowCredentials in the constructor Created 7 years 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
« no previous file with comments | « Source/core/html/parser/HTMLResourcePreloader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLResourcePreloader.cpp
diff --git a/Source/core/html/parser/HTMLResourcePreloader.cpp b/Source/core/html/parser/HTMLResourcePreloader.cpp
index 6adba834f77e9d1163d3f251ac5300410a91b887..08e70a6a2785617032dafddadcfd69eba2ef115b 100644
--- a/Source/core/html/parser/HTMLResourcePreloader.cpp
+++ b/Source/core/html/parser/HTMLResourcePreloader.cpp
@@ -59,9 +59,8 @@ FetchRequest PreloadRequest::resourceRequest(Document* document)
initiatorInfo.position = m_initiatorPosition;
FetchRequest request(ResourceRequest(completeURL(document)), initiatorInfo);
- // FIXME: It's possible CORS should work for other request types?
- if (m_resourceType == Resource::Script)
- request.mutableResourceRequest().setAllowCookies(m_crossOriginModeAllowsCookies);
+ if (m_isCORSEnabled)
+ request.setCrossOriginAccessControl(document->securityOrigin(), m_allowCredentials);
return request;
}
« no previous file with comments | « Source/core/html/parser/HTMLResourcePreloader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698