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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 2473113002: Stop preloading scripts that have invalid type/language attributes (Closed)
Patch Set: Created 4 years, 1 month 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/html/parser/HTMLPreloadScanner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
index 033b23ec59443b17c6bbfb5e954dda2ce9bf0405..7c25b3d54300b54ce06c7231b8554693173ff5a2 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -253,12 +253,11 @@ class TokenPreloadScanner::StartTagScanner {
request->setDefer(m_defer);
request->setIntegrityMetadata(m_integrityMetadata);
- // TODO(csharrison): Once this is deprecated, just abort the request here.
if (match(m_tagImpl, scriptTag) &&
Charlie Harrison 2016/11/03 21:00:40 Can this check be moved to shouldPreload()?
!ScriptLoader::isValidScriptTypeAndLanguage(
m_typeAttributeValue, m_languageAttributeValue,
ScriptLoader::AllowLegacyTypeInTypeAttribute))
- request->setScriptHasInvalidTypeOrLanguage();
+ return nullptr;
return request;
}

Powered by Google App Engine
This is Rietveld 408576698