summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/typedarray/oom-allocating-arraybuffer-contents.js
blob: 1362c8d14c41ad321355ba570979fa699e8d76bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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);