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

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

Issue 657753002: Remove state variables in PumpSession as they are no longer used. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 2 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/HTMLDocumentParser.h ('k') | Source/core/html/parser/HTMLParserScheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index b77695c3155dc67f6535812b9c3c0b90872b5592..0ef764d72dfd6938a2a8037a8ac49af17154a3ca 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -295,16 +295,12 @@ void HTMLDocumentParser::runScriptsForPausedTreeBuilder()
m_scriptRunner->execute(scriptElement.release(), scriptStartPosition);
}
-bool HTMLDocumentParser::canTakeNextToken(PumpSession& session)
+bool HTMLDocumentParser::canTakeNextToken()
{
if (isStopped())
return false;
if (isWaitingForScripts()) {
- // If we don't run the script, we cannot allow the next token to be taken.
- if (session.needsYield)
- return false;
-
// If we're paused waiting for a script, we try to execute scripts before continuing.
runScriptsForPausedTreeBuilder();
if (isStopped())
@@ -587,7 +583,7 @@ void HTMLDocumentParser::pumpTokenizer()
m_xssAuditor.init(document(), &m_xssAuditorDelegate);
- while (canTakeNextToken(session) && !session.needsYield) {
+ while (canTakeNextToken()) {
if (!isParsingFragment())
m_sourceTracker.start(m_input.current(), m_tokenizer.get(), token());
@@ -621,9 +617,6 @@ void HTMLDocumentParser::pumpTokenizer()
m_treeBuilder->flush(FlushAlways);
RELEASE_ASSERT(!isStopped());
- if (session.needsYield)
- m_parserScheduler->scheduleForResume();
-
if (isWaitingForScripts()) {
ASSERT(m_tokenizer->state() == HTMLTokenizer::DataState);
if (!m_preloadScanner) {
« no previous file with comments | « Source/core/html/parser/HTMLDocumentParser.h ('k') | Source/core/html/parser/HTMLParserScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698