whatwg/streams — pull request #193 by tyoshino (2014-09-03 05:42:05+00:00)
Title: Enter "closed" state directly when closePromise is fulfilled

Currently, state transition to the "closed" state is done by
- setting up a fulfill callback to [[closedPromise]] in the constructor
- resolving [[closedPromise]] in [[doClose]]

With this method, the state transition happens via two microtasks. This change
reduces it to just one microtask. This is required for #192 to work.

This change also cleans up unnecessary fields in the write record.