Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index 76be0a6495e39c0fb56fbef6180565220ec9e00b..3f15daa887a93149805e2ae823ee60d2abc02974 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -10327,6 +10327,19 @@ 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()); |
| + String* debug_name = NULL; |
|
yurys
2015/03/13 14:18:21
You should avoid raw pointers in methods that may
kozy
2015/03/13 14:54:47
Done.
|
| + if (name->IsString()) |
| + debug_name = String::cast(*name); |
| + else |
| + debug_name = function->shared()->DebugName(); |
| + return handle(debug_name, isolate); |
| +} |
| + |
| + |
| void Oddball::Initialize(Isolate* isolate, |
| Handle<Oddball> oddball, |
| const char* to_string, |