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

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

Issue 1632523002: `<link rel=preload>` with no `as` should be subject to connect-src (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 342d823cd5992fe6bdbdc632540063ed3789291e..ee68910a47590e325add73e636034c5ae305a4e1 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
@@ -184,8 +184,7 @@ Resource::Type LinkLoader::getTypeFromAsAttribute(const String& as, Document* do
return Resource::TextTrack;
if (document && !as.isEmpty())
document->addConsoleMessage(ConsoleMessage::create(OtherMessageSource, WarningMessageLevel, String("<link rel=preload> must have a valid `as` value")));
- // TODO(yoav): Is this correct? If as is missing or invalid, it should be subject to "connect-src" CSP directives.
- return Resource::LinkSubresource;
+ return Resource::LinkPreload;
}
void LinkLoader::createLinkPreloadResourceClient(ResourcePtr<Resource> resource)
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698