diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Object-defineProperty-07.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Object-defineProperty-07.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Object-defineProperty-07.js b/js/src/jit-test/tests/debug/Object-defineProperty-07.js new file mode 100644 index 000000000..f75c6edf2 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-defineProperty-07.js @@ -0,0 +1,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); |