summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-getOwnPropertyDescriptor-surfaces-01.js
blob: a3224739bf91ad4e554dc104e71567c8b041b2e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// The argument to Debugger.Object.prototype.getOwnPropertyDescriptor can be omitted.

var g = newGlobal();
g.eval("var obj = {};");

var dbg = Debugger(g);
var obj;
dbg.onDebuggerStatement = function (frame) { obj = frame.eval("obj").return; };
g.eval("debugger;");

assertEq(obj.getOwnPropertyDescriptor(), undefined);
g.obj.undefined = 17;
var desc = obj.getOwnPropertyDescriptor();
assertEq(desc.value, 17);