- From: James M Snell <notifications@github.com>
- Date: Mon, 04 Oct 2021 11:04:12 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 4 October 2021 18:04:25 UTC
There's another bug in here that I've found, also relating to the byobRequest getter and autoAllocateChunkSize is used. ```js const rs = new ReadableStream({ type: 'bytes', autoAllocateChunkSize: 10, pull(c) { c.enqueue(new Uint8Array(10)); c.byobRequest.respond(10); } }); const reader = rs.getReader(); console.log(await reader.read()); console.log('test'); ``` This code currently causes the chrome browser tab to crash and Node.js' implementation to assert. The reason is because, while the `enqueue()` does invalidate the current `byobRequest`, the pending pull into is not cleared, meaning that the byobRequest is just recreated when the getter is invoked again. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/1170#issuecomment-933724351
Received on Monday, 4 October 2021 18:04:25 UTC