(controller, chunk)
| 12878 | }); |
| 12879 | } |
| 12880 | function WritableStreamDefaultControllerProcessWrite(controller, chunk) { |
| 12881 | const stream4 = controller._controlledWritableStream; |
| 12882 | WritableStreamMarkFirstWriteRequestInFlight(stream4); |
| 12883 | const sinkWritePromise = controller._writeAlgorithm(chunk); |
| 12884 | uponPromise(sinkWritePromise, () => { |
| 12885 | WritableStreamFinishInFlightWrite(stream4); |
| 12886 | const state2 = stream4._state; |
| 12887 | DequeueValue(controller); |
| 12888 | if (!WritableStreamCloseQueuedOrInFlight(stream4) && state2 === "writable") { |
| 12889 | const backpressure = WritableStreamDefaultControllerGetBackpressure(controller); |
| 12890 | WritableStreamUpdateBackpressure(stream4, backpressure); |
| 12891 | } |
| 12892 | WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); |
| 12893 | return null; |
| 12894 | }, (reason) => { |
| 12895 | if (stream4._state === "writable") { |
| 12896 | WritableStreamDefaultControllerClearAlgorithms(controller); |
| 12897 | } |
| 12898 | WritableStreamFinishInFlightWriteWithError(stream4, reason); |
| 12899 | return null; |
| 12900 | }); |
| 12901 | } |
| 12902 | function WritableStreamDefaultControllerGetBackpressure(controller) { |
| 12903 | const desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller); |
| 12904 | return desiredSize <= 0; |
no test coverage detected
searching dependent graphs…