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

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

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: mac fix Created 4 years 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 6d7a665b2a80160dc85fb544a72bdf89378848af..810da6682475760df21ded3761937d5b8881e9e1 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -131,7 +131,7 @@ HTMLDocumentParser::HTMLDocumentParser(Document& document,
? HTMLTokenizer::create(m_options)
: nullptr),
m_loadingTaskRunner(
- TaskRunnerHelper::get(TaskType::Networking, &document)->clone()),
+ TaskRunnerHelper::get(TaskType::Networking, &document)),
m_parserScheduler(
syncPolicy == AllowAsynchronousParsing
? HTMLParserScheduler::create(this, m_loadingTaskRunner.get())
@@ -844,8 +844,8 @@ void HTMLDocumentParser::startBackgroundParser() {
// The background parser is created on the main thread, but may otherwise
// only be used from the parser thread.
- m_backgroundParser = BackgroundHTMLParser::create(
- std::move(config), m_loadingTaskRunner->clone());
+ m_backgroundParser =
+ BackgroundHTMLParser::create(std::move(config), m_loadingTaskRunner);
// TODO(csharrison): This is a hack to initialize MediaValuesCached on the
// correct thread. We should get rid of it.
postTaskToLookaheadParser(

Powered by Google App Engine
This is Rietveld 408576698