summaryrefslogtreecommitdiff
path: root/js/src/jit-test/tests/basic/testConstructorArgs-3.js
blob: 4b1eb55c0862fbd0e533e99246e03315f3679a15 (plain)
1
2
3
4
5
6
7
8
9
10
11
function f(a) {
    this.a = a;
    assertEq(arguments[1], 'x');
}

for (var x = 0; x < RUNLOOP; ++x) {
    f.prototype = {};
    var obj = new f(x, 'x');  // more than f.length arguments
    assertEq(obj.a, x);
    assertEq(Object.getPrototypeOf(obj), f.prototype);
}