| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 5d4c9c0c415ac558747dfa55b25b19a02c9187b4..b60c4ef0132dbe7cf7c5ea68a764c39c2ec60e65 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -4443,6 +4443,18 @@ Local<Value> Function::GetInferredName() const {
|
| }
|
|
|
|
|
| +Local<Value> Function::GetDebugName() const {
|
| + auto self = Utils::OpenHandle(this);
|
| + if (!self->IsJSFunction()) {
|
| + return ToApiHandle<Primitive>(
|
| + self->GetIsolate()->factory()->undefined_value());
|
| + }
|
| + auto func = i::Handle<i::JSFunction>::cast(self);
|
| + i::Handle<i::String> name = i::JSFunction::GetDebugName(func);
|
| + return Utils::ToLocal(i::Handle<i::Object>(*name, name->GetIsolate()));
|
| +}
|
| +
|
| +
|
| Local<Value> Function::GetDisplayName() const {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| ENTER_V8(isolate);
|
|
|