| 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 f4f659d9e37a3bc7145bb52226a744aa6a37e083..8c1bb05ff59b11fe5223250e9877a69e3fb320d5 100644
|
| --- a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
|
| +++ b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
|
| @@ -452,6 +452,7 @@ void XMLDocumentParser::NotifyFinished(Resource* unused_resource) {
|
| ScriptLoader* script_loader =
|
| ScriptElementBase::FromElementIfPossible(e)->Loader();
|
| DCHECK(script_loader);
|
| + CHECK_EQ(script_loader->GetScriptType(), ScriptType::kClassic);
|
|
|
| if (error_occurred) {
|
| script_loader->DispatchErrorEvent();
|
| @@ -1112,9 +1113,16 @@ 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);
|
| +
|
| + if (script_loader->GetScriptType() != ScriptType::kClassic) {
|
| + // XMLDocumentParser does not support a module script, and thus ignores it.
|
| + success = false;
|
| + VLOG(0) << "Module scripts in XML documents are not supported.";
|
| + }
|
| +
|
| + if (success) {
|
| // FIXME: Script execution should be shared between
|
| // the libxml2 and Qt XMLDocumentParser implementations.
|
|
|
|
|