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

Unified Diff: src/ast/scopes.cc

Issue 2721633004: [inspector] fixed crash on attempt to access empty scope_info on break (Closed)
Patch Set: better test Created 3 years, 10 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 | « no previous file | test/inspector/debugger/step-into-arrow.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 2bc9b3af64ad656c2719475fd98d800ec13492c1..aa7a30813ccf0caab6c1b394242bb3fdb5b71729 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -2260,8 +2260,10 @@ void Scope::AllocateDebuggerScopeInfos(Isolate* isolate,
}
MaybeHandle<ScopeInfo> outer = NeedsContext() ? scope_info_ : outer_scope;
for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) {
- if (scope->is_function_scope()) continue;
- scope->AllocateDebuggerScopeInfos(isolate, outer);
+ if (!scope->is_function_scope() ||
+ scope->AsDeclarationScope()->is_arrow_scope()) {
+ scope->AllocateDebuggerScopeInfos(isolate, outer);
+ }
}
}
« no previous file with comments | « no previous file | test/inspector/debugger/step-into-arrow.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698