summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/args-mutate-proto-2.js
blob: 9645f8809016243313b6bad8a8cd4b37ba745ac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function outOfBounds() {
  var proto = [];
  Object.setPrototypeOf(arguments, proto);

  var N = 100;
  for (var i = 0; i <= N; ++i) {
    if (i === N) {
      proto[0] = "pass";
    }

    var arg = arguments[0];

    assertEq(arg, i !== N ? undefined : "pass");
  }
}
outOfBounds();