Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 07dc8b5d09d18c097aaf38d4479f684296d178d1..12aa1528e2d061dfa12b0a7c9bac99728aad90f9 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1884,7 +1884,13 @@ void Factory::NewJSArrayStorage(Handle<JSArray> array, |
Handle<JSModuleNamespace> Factory::NewJSModuleNamespace() { |
Handle<Map> map = isolate()->js_module_namespace_map(); |
- return Handle<JSModuleNamespace>::cast(NewJSObjectFromMap(map)); |
+ Handle<JSModuleNamespace> module_namespace( |
+ Handle<JSModuleNamespace>::cast(NewJSObjectFromMap(map))); |
+ FieldIndex index = FieldIndex::ForDescriptor( |
+ *map, JSModuleNamespace::kToStringTagFieldIndex); |
+ Handle<String> to_string_value = NewStringFromAsciiChecked("Module"); |
+ module_namespace->FastPropertyAtPut(index, *to_string_value); |
+ return module_namespace; |
} |
Handle<JSGeneratorObject> Factory::NewJSGeneratorObject( |