Reviewers: Toon Verwaest,

Message:
PTAL

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

Please review this at https://codereview.chromium.org/1228373011/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+3, -1 lines):
  M src/variables.cc


Index: src/variables.cc
diff --git a/src/variables.cc b/src/variables.cc
index 18a45abd73890b3fae56caee89618e0f1224ce21..b8fddd306df59ff86b15d00a7e7df009e4662261 100644
--- a/src/variables.cc
+++ b/src/variables.cc
@@ -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();
 }




--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to