summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/regress/regress-665355.js
blob: c027fa8a6447118844def29dc9b97e597a3784d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var x = new ArrayBuffer(2);

var test = function(newProto) {
try {
    x.__proto__ = newProto;
    return false;
} catch(e) {
    return true;
}
}

// assert cycle doesn't work
assertEq(test(x), true);

// works
assertEq(test({}), false);
assertEq(test(null), false);

reportCompare(true, true);