[whatwg/streams] WritableStream: clear algorithms once they will no longer be called (#940)

Clear the [[writeAlgorithm]], [[closeAlgorithm]] and [[abortAlgorithm]]
slots when they will no longer be called. This allows resources such as
the underlying sink object to be freed.

Add [[FinishSteps]] polymorphic operation so that the algorithms will be
cleared correctly even for a future controller that has different slots.
[[FinishSteps]] is only used when the clear operation is initiated from
the WritableStream -- in the case of abort() and close() the clear
operation is initiated by the controller itself and doesn't indirect via
[[FinishSteps]].

Part of #932.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * WritableStream: clear algorithms once they will no longer be called

-- File Changes --

    M index.bs (27)
    M reference-implementation/lib/writable-stream.js (23)

-- Patch Links --

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

Received on Wednesday, 11 July 2018 09:44:06 UTC