summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug630865-5.js
blob: 67fdb7e5b0adbd6cb0dfc76c7bf81936df5d17e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function C(a, b) {
    this.a = a;
    this.b = b;
}
var f = C.bind(null, 2);
Object.defineProperty(f, "prototype", {get: function () { throw "FAIL"; }});
var x;
for (var i = 0; i < 10; i++)
    x = new f(i);
assertEq(toString.call(x), "[object Object]");
assertEq(Object.getPrototypeOf(x), C.prototype);
assertEq(x.a, 2);
assertEq(x.b, 9);