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

Unified Diff: src/runtime.cc

Issue 11519020: Fix set variable value bug: a function argument must be updated in 2 places (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« no previous file with comments | « no previous file | test/mjsunit/debug-set-variable-value.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index ad066ab8c4c47edadfd3c9f03b214c90d09eabe0..8e1702d9a3efe0a3babb2b28fb33fdacd3d06ab7 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -10834,11 +10834,14 @@ static bool SetLocalVariableValue(Isolate* isolate,
Handle<SharedFunctionInfo> shared(function->shared());
Handle<ScopeInfo> scope_info(shared->scope_info());
+ bool default_result = false;
+
// Parameters.
for (int i = 0; i < scope_info->ParameterCount(); ++i) {
if (scope_info->ParameterName(i)->Equals(*variable_name)) {
frame->SetParameterValue(i, *new_value);
- return true;
+ // Argument might be shadowed in heap context, don't stop here.
+ default_result = true;
}
}
@@ -10880,7 +10883,7 @@ static bool SetLocalVariableValue(Isolate* isolate,
}
}
- return false;
+ return default_result;
}
« no previous file with comments | « no previous file | test/mjsunit/debug-set-variable-value.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698