Index: src/debug/debug-scopes.cc |
diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc |
index 3ef7eedfedd983fd247e559ac91ff3e4f9cc3ff4..1f59451a7d7e0418e76310db5976cf4e7223778b 100644 |
--- a/src/debug/debug-scopes.cc |
+++ b/src/debug/debug-scopes.cc |
@@ -801,19 +801,16 @@ void ScopeIterator::CopyContextLocalsToScopeObject( |
int local_count = scope_info->ContextLocalCount(); |
if (local_count == 0) return; |
// Fill all context locals to the context extension. |
- int first_context_var = scope_info->StackLocalCount(); |
- int start = scope_info->ContextLocalNameEntriesIndex(); |
for (int i = 0; i < local_count; ++i) { |
- if (scope_info->LocalIsSynthetic(first_context_var + i)) continue; |
+ Handle<String> name(scope_info->ContextLocalName(i)); |
+ if (ScopeInfo::VariableIsSynthetic(*name)) continue; |
int context_index = Context::MIN_CONTEXT_SLOTS + i; |
Handle<Object> value = Handle<Object>(context->get(context_index), isolate); |
// Reflect variables under TDZ as undefined in scope object. |
if (value->IsTheHole()) continue; |
// This should always succeed. |
// TODO(verwaest): Use AddDataProperty instead. |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- scope_object, handle(String::cast(scope_info->get(i + start))), value, |
- NONE) |
+ JSObject::SetOwnPropertyIgnoreAttributes(scope_object, name, value, NONE) |
.Check(); |
} |
} |