summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug630865-5.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/bug630865-5.js')
-rw-r--r--js/src/jit-test/tests/basic/bug630865-5.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug630865-5.js b/js/src/jit-test/tests/basic/bug630865-5.js
new file mode 100644
index 000000000..67fdb7e5b
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug630865-5.js
@@ -0,0 +1,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);