summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug827659-2.js
blob: f223a6a6d5c3eaa330d20c4eca3ee0732b5dd4c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function f(x) {
    return x["__proto__"]
}
var res = 0;
for each(a in [{}, null]) {
    try {
        f(a);
	res += 20;
    } catch (e) {
	assertEq(e instanceof TypeError, true);
	assertEq(e.message.indexOf("is null") > 0, true);
	res += 50;
    }
}
assertEq(res, 70);