Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index 1cb3af312d19875ed8c58f927173491f990f6767..4407db13e203a7089b524454492f8f7d2e001da4 100644 |
--- a/src/ast/scopes.cc |
+++ b/src/ast/scopes.cc |
@@ -1650,6 +1650,10 @@ void Scope::ResolveVariable(ParseInfo* info, VariableProxy* proxy) { |
namespace { |
bool AccessNeedsHoleCheck(Variable* var, VariableProxy* proxy, Scope* scope) { |
+ if (var->mode() == DYNAMIC_LOCAL) { |
+ return AccessNeedsHoleCheck(var->local_if_not_shadowed(), proxy, scope); |
adamk
2016/12/07 17:37:41
Can you add a DCHECK here:
DCHECK(!var->binding_n
|
+ } |
+ |
if (!var->binding_needs_init()) { |
return false; |
} |