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

var g = newGlobal();
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);