Chromium Code Reviews| Index: src/debug/debug-scopes.cc |
| diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc |
| index e8ef2403934dc06f795a989897c49fa10144d412..e1f73aaec7639b1b5f633b20ed9e6840af5612a9 100644 |
| --- a/src/debug/debug-scopes.cc |
| +++ b/src/debug/debug-scopes.cc |
| @@ -132,6 +132,12 @@ MUST_USE_RESULT MaybeHandle<JSObject> ScopeIterator::MaterializeScopeDetails() { |
| Handle<JSObject> scope_object; |
| ASSIGN_RETURN_ON_EXCEPTION(isolate_, scope_object, ScopeObject(), JSObject); |
| details->set(kScopeDetailsObjectIndex, *scope_object); |
| + if (HasContext() && CurrentContext()->closure()) { |
|
Yang
2015/09/30 10:55:04
Please do explicitly compare with NULL here. We do
kozy
2015/09/30 17:00:18
Done.
|
| + Handle<String> closure_name = JSFunction::GetDebugName( |
| + Handle<JSFunction>(CurrentContext()->closure())); |
| + if (closure_name.location() && closure_name->length()) |
|
Yang
2015/09/30 10:55:04
How about (!closure_name.is_null() && (closure_nam
kozy
2015/09/30 17:00:18
Done.
|
| + details->set(kScopeDetailsNameIndex, *closure_name); |
| + } |
| return isolate_->factory()->NewJSArrayWithElements(details); |
| } |