Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: src/debug/debug-scopes.cc

Issue 1901413002: [debugger] Hide scopes that originate from desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix crash Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-scopes.cc
diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc
index d9c615b01b4c58db22aadf5ab8d3eb004ae792c0..3ef7eedfedd983fd247e559ac91ff3e4f9cc3ff4 100644
--- a/src/debug/debug-scopes.cc
+++ b/src/debug/debug-scopes.cc
@@ -842,7 +842,7 @@ bool ScopeIterator::CopyContextExtensionToScopeObject(
void ScopeIterator::GetNestedScopeChain(Isolate* isolate, Scope* scope,
int position) {
- if (!scope->is_eval_scope()) {
+ if (!scope->is_eval_scope() && !scope->is_hidden()) {
nested_scope_chain_.Add(ExtendedScopeInfo(scope->GetScopeInfo(isolate),
scope->start_position(),
scope->end_position()));
@@ -851,7 +851,7 @@ void ScopeIterator::GetNestedScopeChain(Isolate* isolate, Scope* scope,
Scope* inner_scope = scope->inner_scopes()->at(i);
int beg_pos = inner_scope->start_position();
int end_pos = inner_scope->end_position();
- DCHECK(beg_pos >= 0 && end_pos >= 0);
+ DCHECK((beg_pos >= 0 && end_pos >= 0) || inner_scope->is_hidden());
if (beg_pos <= position && position < end_pos) {
GetNestedScopeChain(isolate, inner_scope, position);
return;
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698