summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/typedarray/oom-allocating-arraybuffer-contents.js
blob: 16d1bf976fa09cc2fa48d84ed8ab241ebd6642f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// |jit-test| skip-if: !('oomTest' in this)

// Resolve ArrayBuffer before OOM-testing, so OOM-testing runs less code and is
// less fragile.
var AB = ArrayBuffer;

function f()
{
  return new AB(256);
}

// Create |f|'s script before OOM-testing for the same reason.
f();

oomTest(f);