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

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

Issue 2099583002: When pumping tokens yield for scripts waiting for resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Format the test files and add a reference to the bug. Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/fast/parser/write-script-waiting-for-style-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 23aa6427f502a717d87f9bbb4569a6116ea9cc4d..30287db2d3055e4770b072aaea1fc621b58d755a 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -272,14 +272,11 @@ bool HTMLDocumentParser::canTakeNextToken()
if (isStopped())
return false;
- if (isWaitingForScripts()) {
- // If we're paused waiting for a script, we try to execute scripts before continuing.
+ // If we're paused waiting for a script, we try to execute scripts before continuing.
+ if (m_treeBuilder->hasParserBlockingScript())
runScriptsForPausedTreeBuilder();
- if (isStopped())
- return false;
- if (isWaitingForScripts())
- return false;
- }
+ if (isStopped() || isWaitingForScripts())
+ return false;
// FIXME: It's wrong for the HTMLDocumentParser to reach back to the
// LocalFrame, but this approach is how the old parser handled
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/parser/write-script-waiting-for-style-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698