| Index: src/accessors.cc
|
| diff --git a/src/accessors.cc b/src/accessors.cc
|
| index b89917f73ecd7cc63b9e00e59c3789e2e95e5e52..653fdc6a8c71741f0fe2cffa514b817b117be3e8 100644
|
| --- a/src/accessors.cc
|
| +++ b/src/accessors.cc
|
| @@ -1074,7 +1074,12 @@ void Accessors::FunctionNameGetter(
|
| HandleScope scope(isolate);
|
| Handle<JSFunction> function =
|
| Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder()));
|
| - Handle<Object> result(function->shared()->name(), isolate);
|
| + Handle<Object> result;
|
| + if (function->shared()->name_should_print_as_anonymous()) {
|
| + result = isolate->factory()->anonymous_string();
|
| + } else {
|
| + result = handle(function->shared()->name(), isolate);
|
| + }
|
| info.GetReturnValue().Set(Utils::ToLocal(result));
|
| }
|
|
|
|
|