| Index: src/debug/debug-scopes.cc
|
| diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc
|
| index 68abfd3a98e903406275d70c8c7c7cf51b6f885a..46c5a3b2f3ef1e216dca865ba200d795bc3d69af 100644
|
| --- a/src/debug/debug-scopes.cc
|
| +++ b/src/debug/debug-scopes.cc
|
| @@ -786,6 +786,11 @@ void ScopeIterator::CopyContextExtensionToScopeObject(
|
|
|
| void ScopeIterator::GetNestedScopeChain(Isolate* isolate, Scope* scope,
|
| int position) {
|
| + if (scope->is_function_scope()) {
|
| + // Do not collect scopes of nested inner functions inside the current one.
|
| + Handle<JSFunction> function = frame_inspector_->GetFunction();
|
| + if (scope->end_position() < function->shared()->end_position()) return;
|
| + }
|
| if (scope->is_hidden()) {
|
| // We need to add this chain element in case the scope has a context
|
| // associated. We need to keep the scope chain and context chain in sync.
|
|
|