Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some extra asserts to TransformStream to clarify invariants
It's a subtle point that TransformStreamEnqueueToReadable only ever changes _backpressure to true, so add an assert for it. The fact that WritableStream only ever calls sink write() when the state is "writable" is important to the correct functioning of TransformStream, so add an assert for that too. Also assert that _backpressureChangePromise has been initialised in write(), for consistency with pull(). Also a minor comment fix to TransformStreamError. No functional changes.
- Loading branch information