[whatwg/streams] Invoking methods should not call .apply() (#613)

The specification documents InvokeOrNoop() and friends as using the
Ecmascript Call() abstract operation. The reference implementation was
calling .apply() on the method instead. Fix it to use
Function.prototype.apply.call() instead.

Also add tests to verify that .apply() and .call() on the underlyingSink
and transformer methods are not called.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Invoking methods should not call .apply()

-- File Changes --

    M reference-implementation/lib/helpers.js (8)
    M reference-implementation/to-upstream-wpts/transform-stream/general.js (16)
    M reference-implementation/to-upstream-wpts/writable-streams/general.js (35)

-- Patch Links --

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

Received on Wednesday, 16 November 2016 03:07:56 UTC