summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/args-redefine-length-4.js
blob: 1029e8fca32b5a8e52902a800f1614e474bb6270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function t()
{
  var a = arguments;
  Object.defineProperty(a, "length", { writable: false });
  for (var i = 0; i < 5; i++)
    assertEq(a.length, 0);

  var desc = Object.getOwnPropertyDescriptor(a, "length");
  assertEq(desc.value, 0);
  assertEq(desc.writable, false);
  assertEq(desc.enumerable, false);
  assertEq(desc.configurable, true);
}
t();