Index: src/runtime/runtime-scopes.cc |
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc |
index c80ec91b539686f53e9c3cb55ad4da53138c0ea1..c0b7efe1dca13d53843a6a3d5423764817baf381 100644 |
--- a/src/runtime/runtime-scopes.cc |
+++ b/src/runtime/runtime-scopes.cc |
@@ -699,6 +699,19 @@ RUNTIME_FUNCTION(Runtime_PushWithContext) { |
return *context; |
} |
+RUNTIME_FUNCTION(Runtime_PushModuleContext) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(3, args.length()); |
+ CONVERT_ARG_HANDLE_CHECKED(JSModule, module, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1); |
+ CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 2); |
+ DCHECK(function->context() == isolate->context()); |
+ |
+ Handle<Context> context = |
+ isolate->factory()->NewModuleContext(module, function, scope_info); |
+ isolate->set_context(*context); |
+ return *context; |
+} |
RUNTIME_FUNCTION(Runtime_PushCatchContext) { |
HandleScope scope(isolate); |