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

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

Issue 2200613002: The HTML parser synchronously creates custom elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eliminate redundant TODOs. Created 4 years, 4 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
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 20960c46ec5a2edb8915bdbc199616621f286455..1a42b3b0535b53003b214a366b4b143fcc0a32a1 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -92,7 +92,7 @@ static HTMLTokenizer::State tokenizerStateForContextElement(Element* contextElem
HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document, ParserSynchronizationPolicy syncPolicy)
: HTMLDocumentParser(document, AllowScriptingContent, syncPolicy)
{
- m_scriptRunner = HTMLScriptRunner::create(&document, this);
+ m_scriptRunner = HTMLScriptRunner::create(reentryPermit(), &document, this);
m_treeBuilder = HTMLTreeBuilder::create(this, document, AllowScriptingContent, m_options);
}
@@ -110,6 +110,7 @@ HTMLDocumentParser::HTMLDocumentParser(DocumentFragment* fragment, Element* cont
HTMLDocumentParser::HTMLDocumentParser(Document& document, ParserContentPolicy contentPolicy, ParserSynchronizationPolicy syncPolicy)
: ScriptableDocumentParser(document, contentPolicy)
, m_options(&document)
+ , m_reentryPermit(HTMLParserReentryPermit::create())
, m_token(syncPolicy == ForceSynchronousParsing ? wrapUnique(new HTMLToken) : nullptr)
, m_tokenizer(syncPolicy == ForceSynchronousParsing ? HTMLTokenizer::create(m_options) : nullptr)
, m_loadingTaskRunner(TaskRunnerHelper::getLoadingTaskRunner(&document)->clone())
@@ -955,7 +956,7 @@ bool HTMLDocumentParser::isWaitingForScripts() const
// never be possible to end up with both objects holding a blocking script.
ASSERT(!(treeBuilderHasBlockingScript && scriptRunnerHasBlockingScript));
// If either object has a blocking script, the parser should be paused.
- return treeBuilderHasBlockingScript || scriptRunnerHasBlockingScript;
+ return treeBuilderHasBlockingScript || scriptRunnerHasBlockingScript || m_reentryPermit->parserPauseFlag();
}
void HTMLDocumentParser::resumeParsingAfterScriptExecution()

Powered by Google App Engine
This is Rietveld 408576698