Index: src/scopes.cc |
diff --git a/src/scopes.cc b/src/scopes.cc |
index c744dd418bbaaca2b74567048f30ecf208274da3..7e7955fba17c3dc0e13703b5ed5a0c2ce2ac0f24 100644 |
--- a/src/scopes.cc |
+++ b/src/scopes.cc |
@@ -593,8 +593,9 @@ class VarAndOrder { |
}; |
-void Scope::CollectStackAndContextLocals(ZoneList<Variable*>* stack_locals, |
- ZoneList<Variable*>* context_locals) { |
+void Scope::CollectStackAndContextLocals( |
+ ZoneList<Variable*>* stack_locals, ZoneList<Variable*>* context_locals, |
+ ZoneList<Variable*>* strong_mode_free_variables) { |
DCHECK(stack_locals != NULL); |
DCHECK(context_locals != NULL); |
@@ -628,6 +629,11 @@ void Scope::CollectStackAndContextLocals(ZoneList<Variable*>* stack_locals, |
p != NULL; |
p = variables_.Next(p)) { |
Variable* var = reinterpret_cast<Variable*>(p->value); |
+ if (is_strong(language_mode()) && strong_mode_free_variables && |
+ var->mode() == DYNAMIC_GLOBAL) { |
+ strong_mode_free_variables->Add(var, zone()); |
+ } |
+ |
if (var->is_used()) { |
vars.Add(VarAndOrder(var, p->order), zone()); |
} |