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 868e71e8c160c3c41f126250859126989ad402f7..2a6893d16e5904c7a64ea93835f52064266c888d 100644 |
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
@@ -50,6 +50,7 @@ |
#include "platform/TraceEvent.h" |
#include "platform/heap/Handle.h" |
#include "public/platform/Platform.h" |
+#include "public/platform/WebFrameScheduler.h" |
#include "public/platform/WebScheduler.h" |
#include "public/platform/WebThread.h" |
#include "wtf/RefCounted.h" |
@@ -143,7 +144,9 @@ HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document, bool reportErrors |
, m_tokenizer(syncPolicy == ForceSynchronousParsing ? HTMLTokenizer::create(m_options) : nullptr) |
, m_scriptRunner(HTMLScriptRunner::create(&document, this)) |
, m_treeBuilder(HTMLTreeBuilder::create(this, &document, parserContentPolicy(), reportErrors, m_options)) |
- , m_parserScheduler(HTMLParserScheduler::create(this)) |
+ , m_loadingTaskRunner(document.frame() ? document.frame()->frameScheduler()->loadingTaskRunner() |
+ : Platform::current()->currentThread()->scheduler()->loadingTaskRunner()) |
+ , m_parserScheduler(HTMLParserScheduler::create(this, m_loadingTaskRunner)) |
, m_xssAuditorDelegate(&document) |
, m_weakFactory(this) |
, m_preloader(HTMLResourcePreloader::create(document)) |
@@ -166,6 +169,7 @@ HTMLDocumentParser::HTMLDocumentParser(DocumentFragment* fragment, Element* cont |
, m_token(adoptPtr(new HTMLToken)) |
, m_tokenizer(HTMLTokenizer::create(m_options)) |
, m_treeBuilder(HTMLTreeBuilder::create(this, fragment, contextElement, this->parserContentPolicy(), m_options)) |
+ , m_loadingTaskRunner(Platform::current()->currentThread()->scheduler()->loadingTaskRunner()) |
Sami
2015/09/25 13:31:27
I'm guessing this isn't used anymore after the doc
alex clarke (OOO till 29th)
2015/09/28 17:24:53
I think that's correct, m_loadingTaskRunner is pas
|
, m_xssAuditorDelegate(&fragment->document()) |
, m_weakFactory(this) |
, m_shouldUseThreading(false) |
@@ -801,7 +805,7 @@ void HTMLDocumentParser::startBackgroundParser() |
ASSERT(config->xssAuditor->isSafeToSendToAnotherThread()); |
ASSERT(config->preloadScanner->isSafeToSendToAnotherThread()); |
HTMLParserThread::shared()->postTask(threadSafeBind(&BackgroundHTMLParser::start, reference.release(), config.release(), |
- AllowCrossThreadAccess(Platform::current()->currentThread()->scheduler()))); |
+ AllowCrossThreadAccess(m_loadingTaskRunner))); |
} |
void HTMLDocumentParser::stopBackgroundParser() |