[whatwg/streams] Specify ReadableStream.[[Transfer]] (#623)

See also #276.

As @domenic mentioned in https://github.com/whatwg/streams/issues/244#issuecomment-257041201, this effort seems more or less blocked on https://github.com/whatwg/html/issues/935, but this at least gives a general idea of the parts it would need to touch.

In particular, there's an apparent problem with transferring errored streams (namely `[[storedError]]`), the easiest solution being to just reject them as non transferable.

StructuredClone doesn't seem to be actually possible to truly polyfill as it iterates over objects in a different order than for-in does, and there doesn't seem to be an obvious way to replicate it; is there any reason StructuredClone isn't/ shouldn't be exposed on its own by the JS engine, for admittedly really niche use cases like this?
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * naive attempt at transferring readable streams
  * Try to implement cloning in readablestream

-- File Changes --

    M index.bs (61)
    M reference-implementation/lib/queue-with-sizes.js (8)
    M reference-implementation/lib/readable-stream.js (60)
    M reference-implementation/package.json (3)

-- Patch Links --

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

Received on Sunday, 4 December 2016 00:39:54 UTC