Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: src/scopes.cc

Issue 464069: Fix for issue 545: don't reuse this VariableProxy. (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index 7da06cdbc03389544ac4f80b86dde5b0c878d9d9..a47d3730a36a491f8de4c638aa3d48fafc51de50 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -189,8 +189,7 @@ void Scope::Initialize(bool inside_with) {
variables_.Declare(this, Factory::this_symbol(), Variable::VAR,
false, Variable::THIS);
var->rewrite_ = new Slot(var, Slot::PARAMETER, -1);
- receiver_ = new VariableProxy(Factory::this_symbol(), true, false);
- receiver_->BindTo(var);
+ receiver_ = var;
if (is_function_scope()) {
// Declare 'arguments' variable which exists in all functions.
« src/compiler.cc ('K') | « src/scopes.h ('k') | test/mjsunit/regress/regress-545.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698