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

Unified Diff: src/ast/scopes.cc

Issue 2352813002: Filter out synthetic variables from with scopes (Closed)
Patch Set: Created 4 years, 3 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 | src/contexts.cc » ('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 d45b02091cd805d1b0e5ec8fad07f651cac2ca7b..0b35d412172ccefeb7efaddd182209d3aff82bbf 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -1446,7 +1446,7 @@ Variable* Scope::LookupRecursive(VariableProxy* proxy, bool declare_free,
// "this" can't be shadowed by "eval"-introduced bindings or by "with"
// scopes.
// TODO(wingo): There are other variables in this category; add them.
- if (var->is_this()) return var;
+ if (ScopeInfo::VariableIsSynthetic(*var->name())) return var;
if (is_with_scope()) {
// The current scope is a with scope, so the variable binding can not be
« no previous file with comments | « no previous file | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698