blob: 7da47e95492cf89332e9244000b438a6b1e72fd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// The argument to Debugger.Object.prototype.getOwnPropertyDescriptor can be an object.
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;");
var nameobj = {toString: function () { return 'x'; }};
assertEq(obj.getOwnPropertyDescriptor(nameobj), undefined);
g.obj.x = 17;
var desc = obj.getOwnPropertyDescriptor(nameobj);
assertEq(desc.value, 17);
|