summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/new-Function-prototype.js
blob: 65198cabb1168e8d45962d91b1058a30a1f88d77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var funProto = Function.prototype;
assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined);
assertEq(parseInt.prototype, undefined);
var oldObj;
for (var i = 0, sz = 9; i < sz; oldObj = obj, i++)
{

  try {
    var obj = new funProto;
  }
  catch (e) {}
  assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined);
  assertEq(Object.getOwnPropertyDescriptor(parseInt, "prototype"), undefined);
  assertEq(parseInt.prototype, undefined);
}