diff options
Diffstat (limited to 'js/src/tests/ecma_6/Proxy/regress-bug950407.js')
-rw-r--r-- | js/src/tests/ecma_6/Proxy/regress-bug950407.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Proxy/regress-bug950407.js b/js/src/tests/ecma_6/Proxy/regress-bug950407.js new file mode 100644 index 000000000..bb4a71eb0 --- /dev/null +++ b/js/src/tests/ecma_6/Proxy/regress-bug950407.js @@ -0,0 +1,11 @@ +var ab = new ArrayBuffer(5); +var p = new Proxy(ab, {}); +var ps = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set; +var threw = 0; +try { + ps.call(p, {}); +} catch(ex) { + threw = 1; +} + +reportCompare(1, threw, "Setting __proto__ on a proxy to an ArrayBuffer must throw."); |