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

  var N = 100;
  for (var i = 0; i <= N; ++i) {
    if (i === N) {
      Object.setPrototypeOf(arguments, proto);
    }

    var arg = arguments[0];

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