Index: src/messages.cc |
diff --git a/src/messages.cc b/src/messages.cc |
index 072ac1d5a694a41f7d33a21363cf114ee29ca05e..bb75364ddb83c25b1c198d4714036661b0fca09d 100644 |
--- a/src/messages.cc |
+++ b/src/messages.cc |
@@ -191,6 +191,14 @@ Handle<Object> CallSite::GetFunctionName() { |
return isolate_->factory()->null_value(); |
} |
+Handle<Object> CallSite::GetDebugName() { |
+ Handle<Object> name = JSReceiver::GetDataProperty( |
+ fun_, isolate_->factory()->display_name_string()); |
+ if (name->IsString() && String::cast(*name)->length() != 0) { |
+ return Handle<String>::cast(name); |
+ } |
+ return isolate_->factory()->null_value(); |
+} |
Handle<Object> CallSite::GetScriptNameOrSourceUrl() { |
Handle<Object> script_obj(fun_->shared()->script(), isolate_); |