| Index: src/runtime/runtime-scopes.cc
|
| diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
|
| index 043fca134e77f7d600f8a9e59c457c1030d2325e..a138fff5c34db05a0263bf7636ec6fd010940e64 100644
|
| --- a/src/runtime/runtime-scopes.cc
|
| +++ b/src/runtime/runtime-scopes.cc
|
| @@ -611,23 +611,27 @@ RUNTIME_FUNCTION(Runtime_NewArgumentsElements) {
|
|
|
| RUNTIME_FUNCTION(Runtime_NewClosure) {
|
| HandleScope scope(isolate);
|
| - DCHECK_EQ(1, args.length());
|
| + DCHECK_EQ(3, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0);
|
| Handle<Context> context(isolate->context(), isolate);
|
| - return *isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
|
| - NOT_TENURED);
|
| + Handle<JSFunction> function =
|
| + isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
|
| + NOT_TENURED);
|
| + return *function;
|
| }
|
|
|
|
|
| RUNTIME_FUNCTION(Runtime_NewClosure_Tenured) {
|
| HandleScope scope(isolate);
|
| - DCHECK_EQ(1, args.length());
|
| + DCHECK_EQ(3, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0);
|
| Handle<Context> context(isolate->context(), isolate);
|
| // The caller ensures that we pretenure closures that are assigned
|
| // directly to properties.
|
| - return *isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
|
| - TENURED);
|
| + Handle<JSFunction> function =
|
| + isolate->factory()->NewFunctionFromSharedFunctionInfo(shared, context,
|
| + TENURED);
|
| + return *function;
|
| }
|
|
|
| static Object* FindNameClash(Handle<ScopeInfo> scope_info,
|
|
|