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

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

    var arg = arguments[0];

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