Commit 3bf99352 authored by ishell's avatar ishell Committed by Commit bot

Fix broken Variable::IsGlobalObjectProperty() after https://codereview.chromium.org/1218783005

Review URL: https://codereview.chromium.org/1228373011

Cr-Commit-Position: refs/heads/master@{#29682}
parent 1d9d8957
......@@ -58,7 +58,9 @@ 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_) || IsStaticGlobalObjectProperty();
return (IsDynamicVariableMode(mode_) ||
(IsDeclaredVariableMode(mode_) && !IsLexicalVariableMode(mode_))) &&
scope_ != NULL && scope_->is_script_scope() && !is_this();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment