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

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

Issue 2694943002: DCHECK: load event is dispatched after executeScript() iff m_isExternalScript
Patch Set: Rebase Created 3 years, 10 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/HTMLParserScriptRunner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
index 88afa39d916a2a36115136ef176f2b1000c90df6..e4ffa2ff5f0327388647aa03e9fee06c7ff640eb 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
@@ -262,6 +262,9 @@ void HTMLParserScriptRunner::executePendingScriptAndDispatchEvent(
monotonicallyIncreasingTime() - scriptParserBlockingTime,
scriptLoader->wasCreatedDuringDocumentWrite());
}
+#if DCHECK_IS_ON()
+ DCHECK(scriptLoader->isExternalScript());
+#endif
if (!doExecuteScript(element, sourceCode, scriptStartPosition)) {
scriptLoader->dispatchErrorEvent();
} else {
@@ -657,6 +660,9 @@ void HTMLParserScriptRunner::processScriptElementInternal(
ScriptSourceCode sourceCode(script->textContent(),
documentURLForScriptExecution(m_document),
scriptStartPosition);
+#if DCHECK_IS_ON()
+ DCHECK(!scriptLoader->isExternalScript());
+#endif
doExecuteScript(script, sourceCode, scriptStartPosition);
}
} else {
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.cpp ('k') | third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698