Re: [streams] Don't allow negative-sized chunks (#370)

> @@ -8,8 +8,8 @@ export function DequeueValue(queue) {
>  
>  export function EnqueueValueWithSize(queue, value, size) {
>    size = Number(size);
> -  if (Number.isNaN(size) || size === +Infinity || size === -Infinity) {
> -    throw new RangeError('Size must be a finite, non-NaN number.');
> +  if (Number.isNaN(size) || size === +Infinity || size < 0) {
> +    throw new RangeError('Size must be a finite, non-negative number.');

non-NaN, non-negative?

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/370/files#r33437077

Received on Monday, 29 June 2015 06:30:17 UTC