Re: [streams] Merge ReadableByteStream into ReadableStream (#430)

> @@ -1729,6 +1739,11 @@ table:
>    1. Set *this*@[[totalQueuedBytes]] to *0*.
>    1. Set *this*@[[started]], and *this*@[[closeRequested]] to *false*.
>    1. Set *this*@[[strategyHWM]] to ValidateAndNormalizeHighWaterMark(_highWaterMark_).
> +  1. Let _autoAllocateChunkSize_ be GetV(_underlyingByteSource_, `"autoAllocateChunkSize"`).
> +  1. If _autoAllocateChunkSize_ is not *undefined*,
> +    1. If Number.isInteger(_autoAllocateChunkSize_) is *true* or _autoAllocateChunkSize_ < 0,

This doesn't look right. (And we shouldn't reference public overridable API functions like Number.isInteger.)

I think instead what we want to do is:

1. Set _autoAllocateChunkSize_ to ToInteger(_autoAllocateChunkSize_).
1. ReturnIfAbrupt(_autoAllocateChunkSize_).
1. If _autoAllocateChunkSize_ ≤ 0, or if _autoAllocateChunkSize_ is +∞ or -∞, throw a **RangeError** exception.

(NaN is automatically converted to 0 so will still throw.)

---
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/a4c2b169b804da3046ca04b76c9883dcad476b23..27bbfcd3cdfae9be413c45869426c5191ec9f0d5#r57058382

Received on Tuesday, 22 March 2016 20:02:39 UTC