Index: src/runtime/runtime-scopes.cc |
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc |
index 67837020bb50d2d08fe244b967190a6cd5890cbd..5474648b59b84bcde28c1b6b28775a7015c2eb28 100644 |
--- a/src/runtime/runtime-scopes.cc |
+++ b/src/runtime/runtime-scopes.cc |
@@ -698,6 +698,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); |