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;
}
}
}
}
- return false;
+ return default_result;
}
})());
+// Check that we correctly update local variable that
+// is referenced from an inner closure.
+RunPauseTest(0, 'Blue', 'v', 'Green', 'Green', (function Factory() {
+ return function() {
+ function A() {
+ var v = "Blue";
+ function Inner() {
+ return void v;
+ }
+ debugger;
+ return v;
+ }
+ return A();
+ }
+})());
+
+// Check that we correctly update parameter, that is known to be stored
+// both on stack and in heap.
+RunPauseTest(0, 5, 'p', 2012, 2012, (function Factory() {
+ return function() {
+ function A(p) {
+ function Inner() {
+ return void p;
+ }
+ debugger;
+ return p;
+ }
+ return A(5);
+ }
+})());
+
+
// Test value description protocol JSON
assertEquals(true, Debug.TestApi.CommandProcessorResolveValue({value: true}));