js/src/tests/ecma_6/Proxy/regress-bug950407.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/ecma_6/Proxy/regress-bug950407.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,11 @@
     1.4 +var ab = new ArrayBuffer(5);
     1.5 +var p = new Proxy(ab, {});
     1.6 +var ps = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set;
     1.7 +var threw = 0;
     1.8 +try {
     1.9 +    ps.call(p, {});
    1.10 +} catch(ex) {
    1.11 +    threw = 1;
    1.12 +}
    1.13 +
    1.14 +reportCompare(1, threw, "Setting __proto__ on a proxy to an ArrayBuffer must throw.");

mercurial