- From: Takeshi Yoshino <notifications@github.com>
- Date: Tue, 16 Jun 2015 03:24:13 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Tuesday, 16 June 2015 10:24:40 UTC
> + }).catch(e => { > + t.fail(e); > + t.end(); > + }); > +}); > + > +test('ReadableByteStream: read(), then respond()', t => { > + let controller; > + > + const rbs = new ReadableByteStream({ > + start(c) { > + controller = c; > + }, > + pull() { > + try { > + controller.respond(1); > Oh gah I now realize that the second buffer argument is optional. Hmm, we'll need to work through the transfer story in a bit more detail, but we can leave that for later. This is a side effect of https://github.com/whatwg/streams/issues/353#issuecomment-111045309. I stored the buffer inside the controller to get prepared for `enqueue()` call in response to `pullInto()`. So, we don't have to receive the buffer from the underlying byte source (only if the underlying byte source hasn't detached it. in such cases, it must pass the active buffer to `respond()`). --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/361/files#r32508128
Received on Tuesday, 16 June 2015 10:24:40 UTC