summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-defineProperty-02.js
blob: e72fd7f2bb8f552ccc1b12d7016cf4277dd27168 (plain)
1
2
3
4
5
6
7
8
9
10
// obj.defineProperty can define a data property with object value.

var g = newGlobal({newCompartment: true});
g.eval("var a = {};");
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
var desc = gw.getOwnPropertyDescriptor("a");
assertEq(desc.value instanceof Debugger.Object, true);
gw.defineProperty("b", desc);
assertEq(g.a, g.b);