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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptLoader.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/dom/ScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index e32b4516f1b353bdf0e889e6dcee3554dd61e551..e5db397ba77213fc86b5d76fee68160c46c9f7fd 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -501,6 +501,9 @@ bool ScriptLoader::prepareScript(const TextPosition& scriptStartPosition,
? elementDocument.url()
: KURL();
+#if DCHECK_IS_ON()
+ DCHECK(!isExternalScript());
+#endif
if (!executeScript(ScriptSourceCode(scriptContent(), scriptURL, position))) {
dispatchErrorEvent();
return false;
@@ -821,6 +824,9 @@ void ScriptLoader::execute() {
if (errorOccurred) {
dispatchErrorEvent();
} else if (!m_resource->wasCanceled()) {
+#if DCHECK_IS_ON()
+ DCHECK(isExternalScript());
+#endif
if (executeScript(source))
dispatchLoadEvent();
else

Powered by Google App Engine
This is Rietveld 408576698