Fix broken Variable::IsGlobalObjectProperty() after https://codereview.chromium.org/1218783005
Review URL: https://codereview.chromium.org/1228373011 Cr-Commit-Position: refs/heads/master@{#29682}
This commit is contained in:
parent
1d9d895754
commit
3bf9935288
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user