Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When underlyingSink.close() resolves, assert state #641

Merged
merged 1 commit into from
Jan 6, 2017

Conversation

ricea
Copy link
Collaborator

@ricea ricea commented Jan 6, 2017

Previously, WritableStreamDefaultControllerProcessClose checked the
state was "closing" or "errored" when underlyingSink.close()
resolved. In fact it can't be anything else, so make it an assert
instead.

Thanks to @tyoshino for spotting this.

Previously, WritableStreamDefaultControllerProcessClose checked the
state was "closing" or "errored" when underlyingSink.close()
resolved. In fact it can't be anything else, so make it an assert
instead.

Thanks to @tyoshino for spotting this.
ricea referenced this pull request Jan 6, 2017
The underlying abort() method will now not be called until any pending
underlying write() has finished. If an underlying close() is in progress
then abort() will no longer be called at all.

Other behavioural changes:

* If the underlying operation has started, then the writer's write() and
close() methods will always reflect the result of the underlying operation,
rather than being rejected because abort() was called.

* Consistently with the above, if an underlying operation calls
controller.error() then the writer method will still reflect the result from
the underlying operation.

* If a call to writer.abort() has to wait for an underlying write() or
close() to complete, and that underlying operation rejects, then the
underlying abort() will not be called, and writer.abort() will return the
rejection from the failed operation.
@tyoshino
Copy link
Member

tyoshino commented Jan 6, 2017

lgtm. thanks!

@domenic domenic merged commit fc065d1 into whatwg:master Jan 6, 2017
@ricea ricea deleted the assert_not_check_state branch January 23, 2017 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants