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 8b0333862476cec082761daa0de4bb30b8d60ee0..4f92958baa85bb25ff600255cd92077d09f1751b 100644 |
--- a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp |
+++ b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp |
@@ -1112,9 +1112,14 @@ void XMLDocumentParser::EndElementNs() { |
DCHECK(!pending_script_); |
requesting_script_ = true; |
- if (script_loader->PrepareScript( |
- script_start_position_, |
- ScriptLoader::kAllowLegacyTypeInTypeAttribute)) { |
+ bool success = script_loader->PrepareScript( |
+ script_start_position_, ScriptLoader::kAllowLegacyTypeInTypeAttribute); |
+ |
+ // XMLDocumentParser does not support module scripts. |
+ // FOXME: (how) should we handle this? Should we fail more gracefully? |
+ CHECK_EQ(script_loader->GetScriptType(), ScriptType::kClassic); |
+ |
+ if (success) { |
// FIXME: Script execution should be shared between |
// the libxml2 and Qt XMLDocumentParser implementations. |