[whatwg/streams] Revise property access order (#922)

Make the order that properties are accessed on the underlying
source, underlying sink, transformer and strategy objects more
consistent. Also make the order that properties are validated more
consistent.

The general order of lookups is now size, highWaterMark, type,
methods. In general values are validated immediately after lookup, but
size and highWaterMark are exceptions. They are always looked up, but
the validation needed depends on the value of "type", so lookup and
validation are separated. This applies even to WritableStream and
TransformStream, to allow for the addition of byte types to those in
future.

The order of lookups in the reference implementation now matches the
standard.

Also convert autoAllocateChunkSize to a number before checking whether
it is integer, for consistency with the way other numeric input is
handled.

Fixes: #917, #921
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/streams/pull/922

-- Commit Summary --

  * Revise property access order

-- File Changes --

    M index.bs (21)
    M reference-implementation/lib/readable-stream.js (21)
    M reference-implementation/lib/transform-stream.js (19)
    M reference-implementation/lib/writable-stream.js (8)
    M reference-implementation/web-platform-tests (2)

-- Patch Links --

https://github.com/whatwg/streams/pull/922.patch
https://github.com/whatwg/streams/pull/922.diff

-- 
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/922

Received on Friday, 13 April 2018 14:55:28 UTC