- From: Takeshi Yoshino <notifications@github.com>
- Date: Fri, 25 Mar 2016 06:31:28 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Friday, 25 March 2016 13:32:00 UTC
> - } else {
> - // The consumer is using the default reader.
> - const buffer = new ArrayBuffer(DEFAULT_CHUNK_SIZE);
> - return fs.read(fd, buffer, 0, DEFAULT_CHUNK_SIZE, position).then(bytesRead => {
> - if (bytesRead === 0) {
> - return fs.close(fd).then(() => controller.close());
> - } else {
> - position += bytesRead;
> - controller.enqueue(new Uint8Array(buffer, 0, bytesRead));
> - }
> - });
> - }
> + // Even when the consumer is using the default reader, the auto allocate feature allocate a buffer and pass it
> + // to us via byobRequest.
> +
> + assert(controller.byobRequest !== undefined);
OK
---
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/pull/430/files/0562267ac9415713151bf0a34ae090c0dfb37c1a..4ad2edc8af0c82da98914eea6bd5c899618d8ec5#r57443713
Received on Friday, 25 March 2016 13:32:00 UTC