| Index: src/runtime/runtime-scopes.cc
|
| diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
|
| index 6c9eb3171246f78769307c34b36b429af4376c4d..0c037db307a60ca994da643e9a2554b462654ced 100644
|
| --- a/src/runtime/runtime-scopes.cc
|
| +++ b/src/runtime/runtime-scopes.cc
|
| @@ -670,9 +670,8 @@
|
| // Script contexts have a canonical empty function as their closure, not the
|
| // anonymous closure containing the global code. See
|
| // FullCodeGenerator::PushFunctionArgumentForContextAllocation.
|
| - Handle<JSFunction> closure(function->shared()->IsUserJavaScript()
|
| - ? native_context->closure()
|
| - : *function);
|
| + Handle<JSFunction> closure(
|
| + function->shared()->IsBuiltin() ? *function : native_context->closure());
|
| Handle<Context> result =
|
| isolate->factory()->NewScriptContext(closure, scope_info);
|
|
|
|
|