Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index e8a9f26a5c08951923c752cfc451a73c3be4a785..6bb7893746d794b7654e1fb7dfd85aaf8f9fe569 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -291,6 +291,15 @@ Handle<Context> Factory::NewGlobalContext() { |
} |
+Handle<Context> Factory::NewModuleContext(Handle<Context> previous, |
+ Handle<ScopeInfo> scope_info) { |
+ CALL_HEAP_FUNCTION( |
+ isolate(), |
+ isolate()->heap()->AllocateModuleContext(*previous, *scope_info), |
+ Context); |
+} |
+ |
+ |
Handle<Context> Factory::NewFunctionContext(int length, |
Handle<JSFunction> function) { |
CALL_HEAP_FUNCTION( |
@@ -324,10 +333,9 @@ Handle<Context> Factory::NewWithContext(Handle<JSFunction> function, |
} |
-Handle<Context> Factory::NewBlockContext( |
- Handle<JSFunction> function, |
- Handle<Context> previous, |
- Handle<ScopeInfo> scope_info) { |
+Handle<Context> Factory::NewBlockContext(Handle<JSFunction> function, |
+ Handle<Context> previous, |
+ Handle<ScopeInfo> scope_info) { |
CALL_HEAP_FUNCTION( |
isolate(), |
isolate()->heap()->AllocateBlockContext(*function, |
@@ -928,6 +936,13 @@ Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor, |
} |
+Handle<JSModule> Factory::NewJSModule() { |
+ CALL_HEAP_FUNCTION( |
+ isolate(), |
+ isolate()->heap()->AllocateJSModule(), JSModule); |
+} |
+ |
+ |
Handle<GlobalObject> Factory::NewGlobalObject( |
Handle<JSFunction> constructor) { |
CALL_HEAP_FUNCTION(isolate(), |