summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/auto-regress/bug1791401.js
blob: 27cf95b0c0880d51c8647ea4255763fba6e1e009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
oomTest(function() {
  var f = Function(`
    // Don't actually enter the loop. This still causes the original bug and
    // additionally makes the test complete faster.
    //
    // Don't directly use |false|, otherwise the byte code emitter won't emit
    // the loop.
    var False = [false, false][0];
    if (False) {
      for (let x;;) {
        // Capture |x|, so it's freshened each loop iteration.
        Object(() => x);
      }
     }
  `);
  f();
});