Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 8d22eb15a2bf93d1ea0588cf64c75852c4815aae..400e15e5c97ddb4fc132baba1b630e7414953787 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1393,6 +1393,12 @@ Handle<ScopeInfo> Factory::NewScopeInfo(int length) { |
return scope_info; |
} |
+Handle<ModuleInfo> Factory::NewModuleInfo() { |
+ Handle<FixedArray> array = NewFixedArray(ModuleInfo::kLength, TENURED); |
+ array->set_map_no_write_barrier(*module_info_map()); |
+ Handle<ModuleInfo> module_info = Handle<ModuleInfo>::cast(array); |
+ return module_info; |
+} |
Handle<JSObject> Factory::NewExternal(void* value) { |
Handle<Foreign> foreign = NewForeign(static_cast<Address>(value)); |