Chromium Code Reviews| Index: Source/core/dom/ScriptLoader.cpp |
| diff --git a/Source/core/dom/ScriptLoader.cpp b/Source/core/dom/ScriptLoader.cpp |
| index e3b3a3e55a7a910d8bb6bfd796a11c57d83a77cc..178d8f94253c81b00419843aeb81c5c26bc2e296 100644 |
| --- a/Source/core/dom/ScriptLoader.cpp |
| +++ b/Source/core/dom/ScriptLoader.cpp |
| @@ -281,12 +281,14 @@ bool ScriptLoader::fetchScript(const String& sourceUrl) |
| bool isHTMLScriptLoader(Element* element) |
| { |
| - return element->hasTagName(HTMLNames::scriptTag); |
| + ASSERT(element); |
| + return isHTMLScriptElement(*element); |
|
eseidel
2014/03/10 18:17:01
Won't dereferencing null on the next line crash ju
Inactive
2014/03/10 18:21:54
I would prefer hitting an assertion than actually
|
| } |
| bool isSVGScriptLoader(Element* element) |
| { |
| - return element->hasTagName(SVGNames::scriptTag); |
| + ASSERT(element); |
| + return isSVGScriptElement(*element); |
| } |
| void ScriptLoader::executeScript(const ScriptSourceCode& sourceCode) |