js/src/jit-test/tests/basic/testNewWithNonNativeProto.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:fe6adb03087a
1 function testNewWithNonNativeProto()
2 {
3 function f() { }
4 var a = f.prototype = [];
5 for (var i = 0; i < 5; i++)
6 var o = new f();
7 return Object.getPrototypeOf(o) === a && o.splice === Array.prototype.splice;
8 }
9 assertEq(testNewWithNonNativeProto(), true);

mercurial