blob: 44329b056d4d747d5ae402b9258b35749e2e6f63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// |jit-test| --no-ion; --no-baseline; --no-blinterp; skip-if: !('oomAfterAllocations' in this && this.hasOwnProperty("ReadableStream"))
// Don't crash on OOM in ReadableStreamDefaultReader.prototype.read().
for (let n = 1; n < 1000; n++) {
let stream = new ReadableStream({
start(controller) {
controller.enqueue(7);
}
});
let reader = stream.getReader();
oomAfterAllocations(n);
try {
reader.read();
n = 1000;
} catch { }
resetOOMFailure();
}
|