summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Environment-setVariable-06.js
blob: 9b235dfe7aa4f6fadc338a03676245b0dfa15959 (plain)
1
2
3
4
5
6
7
8
9
// setVariable on an argument works as expected with non-strict 'arguments'.

var g = newGlobal({newCompartment: true});
g.eval("function f(a) { debugger; return arguments[0]; }");
var dbg = new Debugger(g);
dbg.onDebuggerStatement = function (frame) {
    frame.environment.setVariable("a", 2);
};
assertEq(g.f(1), 2);