Index: src/ast/variables.cc |
diff --git a/src/ast/variables.cc b/src/ast/variables.cc |
index f138727177d93fd49f0d2ceb37ce5668785738af..cd1d8f77b712eeab6058faacb19c285513453508 100644 |
--- a/src/ast/variables.cc |
+++ b/src/ast/variables.cc |
@@ -37,9 +37,8 @@ Variable::Variable(Scope* scope, const AstRawString* name, VariableMode mode, |
bool Variable::IsGlobalObjectProperty() const { |
// Temporaries are never global, they must always be allocated in the |
// activation frame. |
- return (IsDynamicVariableMode(mode()) || |
- (IsDeclaredVariableMode(mode()) && !IsLexicalVariableMode(mode()))) && |
- scope_ != NULL && scope_->is_script_scope(); |
+ return (IsDynamicVariableMode(mode()) || mode() == VAR) && |
+ scope_ != nullptr && scope_->is_script_scope(); |
} |
} // namespace internal |