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

Unified Diff: third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.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
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp ('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/xml/parser/XMLDocumentParser.cpp
diff --git a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
index caaea042ac8955098d60b23f8250229438d42f4a..c86f33b5fedb690b1ef71af9362ca46721eea205 100644
--- a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -461,6 +461,9 @@ void XMLDocumentParser::notifyFinished(Resource* unusedResource) {
scriptLoader->wasCreatedDuringDocumentWrite());
}
+#if DCHECK_IS_ON()
+ DCHECK(scriptLoader->isExternalScript());
+#endif
if (!scriptLoader->executeScript(sourceCode))
scriptLoader->dispatchErrorEvent();
else
@@ -1113,6 +1116,9 @@ void XMLDocumentParser::endElementNs() {
// the libxml2 and Qt XMLDocumentParser implementations.
if (scriptLoader->readyToBeParserExecuted()) {
+#if DCHECK_IS_ON()
+ DCHECK(!scriptLoader->isExternalScript());
+#endif
if (!scriptLoader->executeScript(
ScriptSourceCode(scriptLoader->scriptContent(), document()->url(),
m_scriptStartPosition))) {
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698