Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 13952e838b0d6637c047000ae02872ee8da5d214..4ebcb2a7b4730b2c11fe99e9822661ebb22eace1 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -5301,7 +5301,7 @@ bool JSObject::ReferencesObject(Object* obj) { |
if (context->has_extension() && !context->IsCatchContext()) { |
// With harmony scoping, a JSFunction may have a global context. |
// TODO(mvstanton): walk into the ScopeInfo. |
- if (FLAG_harmony_scoping && context->IsGlobalContext()) { |
+ if (FLAG_harmony_scoping && context->IsScriptContext()) { |
return false; |
} |