diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js b/js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js new file mode 100644 index 0000000000..38827c908d --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js @@ -0,0 +1,16 @@ +// Don't crash when a scripted proxy handler throws Error.prototype. + +var g = newGlobal({newCompartment: true}); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) { + try { + frame.arguments[0].deleteProperty("x"); + } catch (exc) { + return; + } + throw new Error("deleteProperty should throw"); +}; + +g.eval("function h(obj) { debugger; }"); +g.eval("h(new Proxy({}, { deleteProperty() { throw Error.prototype; }}));"); + |