- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 30 Jun 2015 01:53:21 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Tuesday, 30 June 2015 08:53:49 UTC
> + const stream = controller._controlledReadableByteStream;
> +
> + if (typeof pullIntoFunction !== 'function') {
> + DestroyReadableByteStreamController(controller);
> + ErrorReadableByteStream(stream, new TypeError('pullInto property of an underlying byte source must be a function'));
> + return;
> + }
> +
> + assert(controller._pendingPullIntos.length > 0);
> + const pullIntoDescriptor = controller._pendingPullIntos[0];
> +
> + controller._callPullOrPullIntoLaterIfNeeded = false;
> + controller._insideUnderlyingByteSource = true;
> +
> + try {
> + pullIntoFunction.apply(source, [pullIntoDescriptor.buffer,
Hmm, so the signature is (buffer, offsetToWriteAt, ????) the third param confuses me; should it perhaps be `pullIntoDescriptor.byteLength - pullIntoDescriptor.byteOffset - pullIntoDescriptor.bytesFilled`?
I am also suspicious that this kind of (buffer, int, int) structure maybe should be a Uint8Array instead?
---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/361/files#r33552548
Received on Tuesday, 30 June 2015 08:53:49 UTC