Bug 1823429 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

```js
new Response(new ReadableStream({ start(c) { 

for (const i of new Array(40000).fill()) {
 c.enqueue(new Uint8Array(0));
}
c.close();

} })).text();
```

[FetchStreamReader::ChunkSteps](https://searchfox.org/mozilla-central/rev/3c3ad00ab7f587e2c75e8cebb89badc4e946b10e/dom/fetch/FetchStreamReader.cpp#294) is calling OnOutputStreamReady and that calls ReadablStreamDefaultReader::ReadChunk, which then again can call ChunkSteps synchronously. The stack becomes longer as the queue becomes larger.
```js
new Response(new ReadableStream({ start(c) { 

for (const i of new Array(40000).fill()) {
 c.enqueue(new Uint8Array(0));
}
c.close();

} })).text();
```

[FetchStreamReader::ChunkSteps](https://searchfox.org/mozilla-central/rev/3c3ad00ab7f587e2c75e8cebb89badc4e946b10e/dom/fetch/FetchStreamReader.cpp#294) is calling OnOutputStreamReady and that calls ReadabelStreamDefaultReader::ReadChunk, which then again can call ChunkSteps synchronously. The stack becomes longer as the queue becomes larger.
```js
new Response(new ReadableStream({ start(c) { 

for (const i of new Array(40000).fill()) {
 c.enqueue(new Uint8Array(0));
}
c.close();

} })).text();
```

[FetchStreamReader::ChunkSteps](https://searchfox.org/mozilla-central/rev/3c3ad00ab7f587e2c75e8cebb89badc4e946b10e/dom/fetch/FetchStreamReader.cpp#294) is calling OnOutputStreamReady and that calls ReadableStreamDefaultReader::ReadChunk, which then again can call ChunkSteps synchronously. The stack becomes longer as the queue becomes larger.

Back to Bug 1823429 Comment 0