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 |