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

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

Issue 1679703002: Revert of Create MediaValuesCached and TokenPreloadScanner on the parser thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_MediaValuesCached
Patch Set: Created 4 years, 10 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/HTMLDocumentParser.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
index bd84b305306ae63e3d71c760acb147795e1541b8..ce7ae53ee92cb75360850659490e93faa9c2471a 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -687,11 +687,9 @@
// adding paranoia if for speculative crash fix for crbug.com/465478
if (m_preloader) {
if (!m_preloadScanner) {
- m_preloadScanner = HTMLPreloadScanner::create(
- m_options,
+ m_preloadScanner = adoptPtr(new HTMLPreloadScanner(m_options,
document()->url(),
- CachedDocumentParameters::create(document()),
- MediaValuesCached::MediaValuesCachedData(*document()));
+ CachedDocumentParameters::create(document())));
m_preloadScanner->appendToEnd(m_input.current());
}
m_preloadScanner->scan(m_preloader.get(), document()->baseElementURL());
@@ -773,11 +771,9 @@
// Check the document.write() output with a separate preload scanner as
// the main scanner can't deal with insertions.
if (!m_insertionPreloadScanner) {
- m_insertionPreloadScanner = HTMLPreloadScanner::create(
- m_options,
+ m_insertionPreloadScanner = adoptPtr(new HTMLPreloadScanner(m_options,
document()->url(),
- CachedDocumentParameters::create(document()),
- MediaValuesCached::MediaValuesCachedData(*document()));
+ CachedDocumentParameters::create(document())));
}
m_insertionPreloadScanner->appendToEnd(source);
@@ -814,6 +810,7 @@
config->xssAuditor = adoptPtr(new XSSAuditor);
config->xssAuditor->init(document(), &m_xssAuditorDelegate);
+ config->preloadScanner = adoptPtr(new TokenPreloadScanner(document()->url().copy(), CachedDocumentParameters::create(document())));
config->decoder = takeDecoder();
config->parsedChunkQueue = m_parsedChunkQueue.get();
if (document()->settings()) {
@@ -824,13 +821,8 @@
}
ASSERT(config->xssAuditor->isSafeToSendToAnotherThread());
- HTMLParserThread::shared()->postTask(threadSafeBind(
- &BackgroundHTMLParser::start,
- reference.release(),
- config.release(),
- document()->url(),
- CachedDocumentParameters::create(document()),
- MediaValuesCached::MediaValuesCachedData(*document()),
+ ASSERT(config->preloadScanner->isSafeToSendToAnotherThread());
+ HTMLParserThread::shared()->postTask(threadSafeBind(&BackgroundHTMLParser::start, reference.release(), config.release(),
adoptPtr(m_loadingTaskRunner->clone())));
}

Powered by Google App Engine
This is Rietveld 408576698