summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-defineProperty-04.js
blob: e109e748e40616b090c64e21a054dc06943942be (plain)
1
2
3
4
5
6
7
8
9
// defineProperty can add array elements, bumping length

var g = newGlobal();
g.a = g.Array(0, 1, 2);
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
var aw = gw.getOwnPropertyDescriptor("a").value;
aw.defineProperty(3, {configurable: true, enumerable: true, writable: true, value: 3});
assertEq(g.a.length, 4);