| 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())));
|
| }
|
|
|
|
|