Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index 66241e1a11aae9e4b17adb3f467dae154aec602e..5ddfafab322aa55c15fe2d8e0e3c939cb1f67fcc 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -75,6 +75,11 @@ ParseInfo::ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared) |
Handle<Script> script(Script::cast(shared->script())); |
set_script(script); |
+ |
+ if (script->is_module()) { |
+ set_module(); |
+ } |
+ |
if (!script.is_null() && script->type() == Script::TYPE_NATIVE) { |
set_native(); |
} |
@@ -89,6 +94,10 @@ ParseInfo::ParseInfo(Zone* zone, Handle<Script> script) : ParseInfo(zone) { |
set_unicode_cache(isolate_->unicode_cache()); |
set_script(script); |
+ if (script->is_module()) { |
+ set_module(); |
+ } |
+ |
if (script->type() == Script::TYPE_NATIVE) { |
set_native(); |
} |