Chromium Code Reviews| 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 2b19ef87843d7094d9609e67a09d1dd809adbd41..9e05a4bc9fd91fffa3c5ddbc6e0498d59ff55fbf 100644 |
| --- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
| +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp |
| @@ -25,6 +25,7 @@ |
| #include "bindings/core/v8/ScriptController.h" |
| #include "bindings/core/v8/ScriptSourceCode.h" |
| +#include "bindings/core/v8/UnionTypesCore.h" |
|
fs
2016/05/04 10:35:21
Nit: Don't think this include is needed any longer
ramya.v
2016/05/04 10:41:18
Done.
|
| #include "core/HTMLNames.h" |
| #include "core/SVGNames.h" |
| #include "core/dom/Document.h" |
| @@ -425,15 +426,15 @@ bool ScriptLoader::executeScript(const ScriptSourceCode& sourceCode, double* com |
| // with additional support for HTML imports. |
| IgnoreDestructiveWriteCountIncrementer ignoreDestructiveWriteCountIncrementer(m_isExternalScript || isImportedScript ? contextDocument : 0); |
| - if (isHTMLScriptLoader(m_element)) |
| - contextDocument->pushCurrentScript(toHTMLScriptElement(m_element)); |
| + if (isHTMLScriptLoader(m_element) || isSVGScriptLoader(m_element)) |
| + contextDocument->pushCurrentScript(m_element); |
| // Create a script from the script element node, using the script |
| // block's source and the script block's type. |
| // Note: This is where the script is compiled and actually executed. |
| frame->script().executeScriptInMainWorld(sourceCode, accessControlStatus, compilationFinishTime); |
| - if (isHTMLScriptLoader(m_element)) { |
| + if (isHTMLScriptLoader(m_element) || isSVGScriptLoader(m_element)) { |
| DCHECK(contextDocument->currentScript() == m_element); |
| contextDocument->popCurrentScript(); |
| } |