Index: Source/core/html/parser/HTMLParserScheduler.cpp |
diff --git a/Source/core/html/parser/HTMLParserScheduler.cpp b/Source/core/html/parser/HTMLParserScheduler.cpp |
index 9fd3f1ae370e1d048de1b20d1816e0fde7f44f1a..c15e43b54992427549583a7dbe6d8cefd0cd323a 100644 |
--- a/Source/core/html/parser/HTMLParserScheduler.cpp |
+++ b/Source/core/html/parser/HTMLParserScheduler.cpp |
@@ -85,7 +85,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_cancellableContinueParse(CancellableTaskFactory::create(this, &HTMLParserScheduler::continueParsing)) |
, m_isSuspendedWithActiveTimer(false) |
{ |
} |
@@ -97,31 +97,31 @@ HTMLParserScheduler::~HTMLParserScheduler() |
void HTMLParserScheduler::scheduleForResume() |
{ |
ASSERT(!m_isSuspendedWithActiveTimer); |
- m_loadingTaskRunner->postTask(FROM_HERE, m_cancellableContinueParse.cancelAndCreate()); |
+ m_loadingTaskRunner->postTask(FROM_HERE, m_cancellableContinueParse->cancelAndCreate()); |
} |
void HTMLParserScheduler::suspend() |
{ |
ASSERT(!m_isSuspendedWithActiveTimer); |
- if (!m_cancellableContinueParse.isPending()) |
+ if (!m_cancellableContinueParse->isPending()) |
return; |
m_isSuspendedWithActiveTimer = true; |
- m_cancellableContinueParse.cancel(); |
+ m_cancellableContinueParse->cancel(); |
} |
void HTMLParserScheduler::resume() |
{ |
- ASSERT(!m_cancellableContinueParse.isPending()); |
+ ASSERT(!m_cancellableContinueParse->isPending()); |
if (!m_isSuspendedWithActiveTimer) |
return; |
m_isSuspendedWithActiveTimer = false; |
- m_loadingTaskRunner->postTask(FROM_HERE, m_cancellableContinueParse.cancelAndCreate()); |
+ m_loadingTaskRunner->postTask(FROM_HERE, m_cancellableContinueParse->cancelAndCreate()); |
} |
void HTMLParserScheduler::detach() |
{ |
- m_cancellableContinueParse.cancel(); |
+ m_cancellableContinueParse->cancel(); |
m_isSuspendedWithActiveTimer = false; |
} |
@@ -161,7 +161,7 @@ bool HTMLParserScheduler::yieldIfNeeded(const SpeculationsPumpSession& session, |
void HTMLParserScheduler::forceResumeAfterYield() |
{ |
- ASSERT(!m_cancellableContinueParse.isPending()); |
+ ASSERT(!m_cancellableContinueParse->isPending()); |
m_isSuspendedWithActiveTimer = true; |
} |