blob: 8b3205405800c58b677f74983c2d7f28268d581d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// obj.defineProperty works when obj's referent is a wrapper.
var x = {};
var g = newGlobal();
g.x = x;
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
var xw = gw.getOwnPropertyDescriptor("x").value;
xw.defineProperty("p", {configurable: true, enumerable: true, writable: true, value: gw});
assertEq(x.p, g);
var desc = Object.getOwnPropertyDescriptor(x, "p");
assertEq(desc.configurable, true);
assertEq(desc.enumerable, true);
assertEq(desc.writable, true);
assertEq(desc.value, g);
|