[streams] Make the context be the transform object when calling transform and flush (#356)

I know the TransformStream is a work in progress...

With the parameter destructuring used in the constructor of TransformStream class, the global context ends up being used when transform and flush are called.  That makes it difficult to use a transform object that wants to use its own state.

Here is a sample test and a change to transform-stream that allows my test to pass.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Make the context be the transform object when calling transform and flush.

-- File Changes --

    M reference-implementation/lib/transform-stream.js (16)
    M reference-implementation/test/transform-stream.js (22)

-- Patch Links --

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

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

Received on Wednesday, 6 May 2015 21:09:42 UTC