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

Unified Diff: src/ast/scopes.cc

Issue 2424693003: Take the scope info of the direct outer scope as outer scope info (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | 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 d7decb04bf01d96bd7c1b052232af5d39094babd..b197cb6990f79b9f713b68c9b84668c9d74e22a2 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -1087,11 +1087,8 @@ void DeclarationScope::AllocateVariables(ParseInfo* info, AnalyzeMode mode) {
AllocateVariablesRecursively();
MaybeHandle<ScopeInfo> outer_scope;
- for (const Scope* s = outer_scope_; s != nullptr; s = s->outer_scope_) {
- if (s->scope_info_.is_null()) continue;
- outer_scope = s->scope_info_;
- break;
- }
+ if (outer_scope_ != nullptr) outer_scope = outer_scope_->scope_info_;
jochen (gone - plz use gerrit) 2016/10/17 09:55:51 DCHECK that scope_info_ is not null?
Toon Verwaest 2016/10/17 10:34:37 That scope info isn't guaranteed to be non-null. W
+
AllocateScopeInfosRecursively(info->isolate(), outer_scope);
if (mode == AnalyzeMode::kDebugger) {
AllocateDebuggerScopeInfos(info->isolate(), outer_scope);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698