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

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

Issue 2440803002: Filter out data urls in the preload scanner (Closed)
Patch Set: also block ref urls 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/CSSPreloadScanner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp b/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp
index 9c1d3c612f0796af666e3d709e173c53185144b5..5e96c7e57a528a6fcfa7b41189faf15d9f364fc5 100644
--- a/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp
@@ -238,8 +238,10 @@ void CSSPreloadScanner::emitRule(const SegmentedString& source) {
PreloadRequest::create(FetchInitiatorTypeNames::css, position, url,
*m_predictedBaseElementURL,
Resource::CSSStyleSheet, m_referrerPolicy);
- // FIXME: Should this be including the charset in the preload request?
- m_requests->append(std::move(request));
+ if (request) {
+ // FIXME: Should this be including the charset in the preload request?
+ m_requests->append(std::move(request));
+ }
}
m_state = Initial;
} else if (equalIgnoringCase(m_rule, "charset"))

Powered by Google App Engine
This is Rietveld 408576698