Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 76be0a6495e39c0fb56fbef6180565220ec9e00b..8e093845e081f611c07597cfb9c1d174112c680f 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -10327,6 +10327,15 @@ bool JSFunction::PassesFilter(const char* raw_filter) { |
} |
+Handle<String> JSFunction::GetDebugName(Handle<JSFunction> function) { |
+ Isolate* isolate = function->GetIsolate(); |
+ Handle<Object> name = |
+ JSObject::GetDataProperty(function, isolate->factory()->name_string()); |
+ if (name->IsString()) return Handle<String>::cast(name); |
+ return handle(function->shared()->DebugName(), isolate); |
+} |
+ |
+ |
void Oddball::Initialize(Isolate* isolate, |
Handle<Oddball> oddball, |
const char* to_string, |