summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-defineProperty-10.js
blob: 3e4f9930c59379d33e645dd3983febfa023222d2 (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({newCompartment: true});
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);