Commit 50b996f2 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

Debugger: expose local scope for class member initializer

R=gsathya@chromium.org

Change-Id: I892b96d5749066df476ace705f45a801a795c0a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706060
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62806}
parent e55e0aa5
......@@ -538,11 +538,8 @@ void ScopeIterator::RetrieveScopeChain(DeclarationScope* scope) {
int beg_pos = inner_scope->start_position();
int end_pos = inner_scope->end_position();
DCHECK((beg_pos >= 0 && end_pos >= 0) || inner_scope->is_hidden());
if (beg_pos <= position && position < end_pos) {
// Don't walk into inner functions.
if (!inner_scope->is_function_scope()) {
current = inner_scope;
}
if (beg_pos < position && position < end_pos) {
current = inner_scope;
break;
}
}
......
......@@ -89,6 +89,26 @@ Running test: testScopesPaused
}
scopeChain : [
[0] : {
endLocation : {
columnNumber : 13
lineNumber : 14
scriptId : <scriptId>
}
name : run
object : {
className : Object
description : Object
objectId : <objectId>
type : object
}
startLocation : {
columnNumber : 4
lineNumber : 12
scriptId : <scriptId>
}
type : local
}
[1] : {
endLocation : {
columnNumber : 3
lineNumber : 15
......@@ -108,7 +128,7 @@ Running test: testScopesPaused
}
type : block
}
[1] : {
[2] : {
endLocation : {
columnNumber : 1
lineNumber : 19
......@@ -128,7 +148,7 @@ Running test: testScopesPaused
}
type : local
}
[2] : {
[3] : {
object : {
className : global
description : global
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment