summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Proxy/regress-bug950407.js
blob: bb4a71eb042e7b0c70c5af430b61d467a660f086 (plain)
1
2
3
4
5
6
7
8
9
10
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.");