blob: f75c6edf27441a1a92735ce61227e6f0f6548733 (
plain)
1
2
3
4
5
6
7
8
9
10
|
// obj.defineProperty throws if a value, getter, or setter is not a debuggee value.
load(libdir + "asserts.js");
var g = newGlobal();
var dbg = new Debugger;
var gobj = dbg.addDebuggee(g);
assertThrowsInstanceOf(function () { gobj.defineProperty('x', {value: {}}); }, TypeError);
assertThrowsInstanceOf(function () { gobj.defineProperty('x', {get: Number}); }, TypeError);
assertThrowsInstanceOf(function () { gobj.defineProperty('x', {get: gobj, set: Number}) },
TypeError);
|