[whatwg/streams] check if sink/source methods are callable in constructor (#568)

Before, it waited until there was a reason to call them, then errored the stream when it couldn't. But this can easily be caught much earlier in the constructor instead the same way strategies are already validated.

It looks like it would've never even been noticeable if `abort` or `cancel` were set to a non-function.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * add ValidateMethodsAreFunctions helper
  * validate source and sink methods are callable

-- File Changes --

    M index.bs (12)
    M reference-implementation/lib/helpers.js (10)
    M reference-implementation/lib/readable-stream.js (6)
    M reference-implementation/lib/writable-stream.js (4)

-- Patch Links --

https://github.com/whatwg/streams/pull/568.patch
https://github.com/whatwg/streams/pull/568.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/568

Received on Thursday, 27 October 2016 02:48:01 UTC