Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/testing/DummyModulator.cpp ('k') | threejs-bootstrap.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « third_party/WebKit/Source/core/testing/DummyModulator.cpp ('k') | threejs-bootstrap.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698