diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/basic/new-bound-function.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/basic/new-bound-function.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,20 @@ +var funProto = Function.prototype; +assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined); + +function Point(x, y) { this.x = x; this.y = y; } + +var YAxisPoint = Point.bind(null, 0); + +assertEq(YAxisPoint.prototype, undefined); + +var oldPoint; +for (var i = 0, sz = 9; i < sz; oldPoint = point, i++) +{ + var point = new YAxisPoint(5); + assertEq(point === oldPoint, false); + assertEq(point.x, 0); + assertEq(point.y, 5); + assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined); + assertEq(Object.getOwnPropertyDescriptor(YAxisPoint, "prototype"), undefined); +} +