| Index: src/runtime/runtime-function.cc
|
| diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
|
| index 939bd53e6a82799a6ce53a466fb4074a8146964c..37d8b03d66e8ddefebef74d3ec125400f1d547a3 100644
|
| --- a/src/runtime/runtime-function.cc
|
| +++ b/src/runtime/runtime-function.cc
|
| @@ -16,11 +16,19 @@ namespace v8 {
|
| namespace internal {
|
|
|
| RUNTIME_FUNCTION(Runtime_FunctionGetName) {
|
| - SealHandleScope shs(isolate);
|
| + HandleScope scope(isolate);
|
| DCHECK(args.length() == 1);
|
|
|
| - CONVERT_ARG_CHECKED(JSFunction, f, 0);
|
| - return f->shared()->name();
|
| + CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
|
| + Handle<Object> result;
|
| + if (function->IsJSBoundFunction()) {
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
| + isolate, result, JSBoundFunction::GetName(
|
| + isolate, Handle<JSBoundFunction>::cast(function)));
|
| + } else {
|
| + result = JSFunction::GetName(isolate, Handle<JSFunction>::cast(function));
|
| + }
|
| + return *result;
|
| }
|
|
|
|
|
|
|