(stream4, reason)
| 14661 | return stream4._backpressureChangePromise; |
| 14662 | } |
| 14663 | function TransformStreamDefaultSourceCancelAlgorithm(stream4, reason) { |
| 14664 | const controller = stream4._transformStreamController; |
| 14665 | if (controller._finishPromise !== void 0) { |
| 14666 | return controller._finishPromise; |
| 14667 | } |
| 14668 | const writable = stream4._writable; |
| 14669 | controller._finishPromise = newPromise((resolve, reject) => { |
| 14670 | controller._finishPromise_resolve = resolve; |
| 14671 | controller._finishPromise_reject = reject; |
| 14672 | }); |
| 14673 | const cancelPromise = controller._cancelAlgorithm(reason); |
| 14674 | TransformStreamDefaultControllerClearAlgorithms(controller); |
| 14675 | uponPromise(cancelPromise, () => { |
| 14676 | if (writable._state === "errored") { |
| 14677 | defaultControllerFinishPromiseReject(controller, writable._storedError); |
| 14678 | } else { |
| 14679 | WritableStreamDefaultControllerErrorIfNeeded(writable._writableStreamController, reason); |
| 14680 | TransformStreamUnblockWrite(stream4); |
| 14681 | defaultControllerFinishPromiseResolve(controller); |
| 14682 | } |
| 14683 | return null; |
| 14684 | }, (r3) => { |
| 14685 | WritableStreamDefaultControllerErrorIfNeeded(writable._writableStreamController, r3); |
| 14686 | TransformStreamUnblockWrite(stream4); |
| 14687 | defaultControllerFinishPromiseReject(controller, r3); |
| 14688 | return null; |
| 14689 | }); |
| 14690 | return controller._finishPromise; |
| 14691 | } |
| 14692 | function defaultControllerBrandCheckException(name) { |
| 14693 | return new TypeError(`TransformStreamDefaultController.prototype.${name} can only be used on a TransformStreamDefaultController`); |
| 14694 | } |
no test coverage detected
searching dependent graphs…