summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testNewWithNonNativeProto.js
blob: dc950efc7cc9ed1497433c0c00f50614d1d3c718 (plain)
1
2
3
4
5
6
7
8
9
function testNewWithNonNativeProto()
{
  function f() { }
  var a = f.prototype = [];
  for (var i = 0; i < 5; i++)
    var o = new f();
  return Object.getPrototypeOf(o) === a && o.splice === Array.prototype.splice;
}
assertEq(testNewWithNonNativeProto(), true);