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 9c66b2d3af5288cdaa5eb1c8e649ac3c2bf90563..2cad737cb5412d8e053bde6c3dda22a82eff006d 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); |
kouhei (in TOK)
2017/04/24 01:24:04
If PrepareScript is ensured to fail in XML documen
hiroshige
2017/04/26 01:09:34
(Probably) no because ScriptLoader doesn't check w
kouhei (in TOK)
2017/04/26 02:05:27
Sorry for the back-and-forth (≧∞≦)
Now I think Pre
hiroshige
2017/04/26 19:10:21
Hmm. To do so, I think PrepareScript() should take
|
+ |
+ if (success) { |
// FIXME: Script execution should be shared between |
// the libxml2 and Qt XMLDocumentParser implementations. |