diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/testProxyDefinePropertyWithMissingSetter.js')
-rw-r--r-- | js/src/jit-test/tests/basic/testProxyDefinePropertyWithMissingSetter.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testProxyDefinePropertyWithMissingSetter.js b/js/src/jit-test/tests/basic/testProxyDefinePropertyWithMissingSetter.js new file mode 100644 index 000000000..19bb71583 --- /dev/null +++ b/js/src/jit-test/tests/basic/testProxyDefinePropertyWithMissingSetter.js @@ -0,0 +1,21 @@ +// throw, don't crash + +var actual = ""; + +try { + +var x = new Proxy({}, { + defineProperty: function(target, name, desc) { + Object.defineProperty(x, name, desc) + }, +}); + +Object.defineProperty(x, "", ({ + get: function() {} +})) + +} catch (e) { + actual = '' + e; +} + +assertEq(actual, "InternalError: too much recursion"); |