summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-unsafeDereference-01.js
blob: 7e560b6652b0bd2f9f11428b715aff1d21e66065 (plain)
1
2
3
4
5
6
7
8
9
10
// Debugger.Object.prototype.unsafeDereference returns the referent directly.

var g = newGlobal();
var dbg = new Debugger();
var gw = dbg.addDebuggee(g);

assertEq(gw.getOwnPropertyDescriptor('Math').value.unsafeDereference(), g.Math);

g.eval('var obj = {}');
assertEq(gw.getOwnPropertyDescriptor('obj').value.unsafeDereference(), g.obj);