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

Unified Diff: Source/core/html/parser/HTMLParserScheduler.cpp

Issue 1303153005: Introduce WebTaskRunner Patch 3/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing #include Created 5 years, 3 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
« no previous file with comments | « Source/core/html/parser/HTMLParserScheduler.h ('k') | Source/core/html/parser/HTMLParserThread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLParserScheduler.cpp
diff --git a/Source/core/html/parser/HTMLParserScheduler.cpp b/Source/core/html/parser/HTMLParserScheduler.cpp
index 22e6eff6a0e543e5f6ec4986eb0424f2f7cbd3bb..9fd3f1ae370e1d048de1b20d1816e0fde7f44f1a 100644
--- a/Source/core/html/parser/HTMLParserScheduler.cpp
+++ b/Source/core/html/parser/HTMLParserScheduler.cpp
@@ -84,6 +84,7 @@ void SpeculationsPumpSession::addedElementTokens(size_t count)
HTMLParserScheduler::HTMLParserScheduler(HTMLDocumentParser* parser)
: m_parser(parser)
+ , m_loadingTaskRunner(Platform::current()->currentThread()->scheduler()->loadingTaskRunner())
, m_cancellableContinueParse(WTF::bind(&HTMLParserScheduler::continueParsing, this))
, m_isSuspendedWithActiveTimer(false)
{
@@ -96,8 +97,7 @@ HTMLParserScheduler::~HTMLParserScheduler()
void HTMLParserScheduler::scheduleForResume()
{
ASSERT(!m_isSuspendedWithActiveTimer);
- Platform::current()->currentThread()->scheduler()->postLoadingTask(
- FROM_HERE, m_cancellableContinueParse.cancelAndCreate());
+ m_loadingTaskRunner->postTask(FROM_HERE, m_cancellableContinueParse.cancelAndCreate());
}
void HTMLParserScheduler::suspend()
@@ -116,8 +116,7 @@ void HTMLParserScheduler::resume()
return;
m_isSuspendedWithActiveTimer = false;
- Platform::current()->currentThread()->scheduler()->postLoadingTask(
- FROM_HERE, m_cancellableContinueParse.cancelAndCreate());
+ m_loadingTaskRunner->postTask(FROM_HERE, m_cancellableContinueParse.cancelAndCreate());
}
void HTMLParserScheduler::detach()
« no previous file with comments | « Source/core/html/parser/HTMLParserScheduler.h ('k') | Source/core/html/parser/HTMLParserThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698