-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix interaction between writable.abort() and readable.cancel()
If writable.abort() is called when the WritableStream is waiting for another operation to complete, and then readable.cancel() is called before the queued abort is processed, an assert() would happen due to trying to error the TransformStream twice. Change TransformStreamDefaultSink's abort() method to use TransformStreamErrorIfNeeded to correctly handle this case. Also add tests for this case, and to confirm that it is the call to abort() that errors the writable in this case. Also remove the [[writableDone]] slot. It was only used to avoid calling WritableStreamDefaultControllerError when the stream wasn't writable. This is exactly the semantics that WritableStreamDefaultControllerErrorIfNeeded has, so use that instead.
- Loading branch information
Showing
3 changed files
with
43 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters