summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-defineProperty-10.js
blob: 62a7d63be6712e97eb534f4d7dac2469077a443d (plain)
1
2
3
4
5
6
7
8
9
10
// defineProperty can make a non-configurable writable property non-writable

load(libdir + "asserts.js");
var g = newGlobal();
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
gw.defineProperty("p", {writable: true, value: 1});
gw.defineProperty("p", {writable: false});
g.p = 4;
assertEq(g.p, 1);