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

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

Issue 2440803002: Filter out data urls in the preload scanner (Closed)
Patch Set: fix up Created 4 years, 2 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/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 b664912074081ba5a020b8c0980045d2d856b970..4f695c0a48af97023ffbfb36639ae7900964fe88 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -244,6 +244,9 @@ class TokenPreloadScanner::StartTagScanner {
std::unique_ptr<PreloadRequest> request = PreloadRequest::create(
initiatorFor(m_tagImpl), position, m_urlToLoad, predictedBaseURL, type,
referrerPolicy, resourceWidth, clientHintsPreferences, requestType);
+ if (!request)
+ return nullptr;
+
request->setCrossOrigin(m_crossOrigin);
request->setNonce(m_nonce);
request->setCharset(charset());

Powered by Google App Engine
This is Rietveld 408576698