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

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

Issue 1312843009: Improve CancellableTaskFactory handling and Oilpan usage. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add unwrap() clarification 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/platform/heap/Handle.h » ('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 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;
}
« no previous file with comments | « Source/core/html/parser/HTMLParserScheduler.h ('k') | Source/platform/heap/Handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698