summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/baseline/bug892787-1.js
blob: 9afb3b4333f90b518eb010ec5f52fb980422688f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Constructing calls must throw if !callee->isInterpretedConstructor().
[0].some(Function.prototype)
function f() {
    new Function.prototype
}
function g() {
    var count = 0;
    for (var i=0; i<3; i++) {
	try {
            f();
	} catch (e) {
	    assertEq(e.message.includes("is not a constructor"), true);
	    count++;
	}
    }
    assertEq(count, 3);
}
g();