(controller)
| 11632 | controller._cancelAlgorithm = void 0; |
| 11633 | } |
| 11634 | function ReadableByteStreamControllerClose(controller) { |
| 11635 | const stream4 = controller._controlledReadableByteStream; |
| 11636 | if (controller._closeRequested || stream4._state !== "readable") { |
| 11637 | return; |
| 11638 | } |
| 11639 | if (controller._queueTotalSize > 0) { |
| 11640 | controller._closeRequested = true; |
| 11641 | return; |
| 11642 | } |
| 11643 | if (controller._pendingPullIntos.length > 0) { |
| 11644 | const firstPendingPullInto = controller._pendingPullIntos.peek(); |
| 11645 | if (firstPendingPullInto.bytesFilled % firstPendingPullInto.elementSize !== 0) { |
| 11646 | const e3 = new TypeError("Insufficient bytes to fill elements in the given buffer"); |
| 11647 | ReadableByteStreamControllerError(controller, e3); |
| 11648 | throw e3; |
| 11649 | } |
| 11650 | } |
| 11651 | ReadableByteStreamControllerClearAlgorithms(controller); |
| 11652 | ReadableStreamClose(stream4); |
| 11653 | } |
| 11654 | function ReadableByteStreamControllerEnqueue(controller, chunk) { |
| 11655 | const stream4 = controller._controlledReadableByteStream; |
| 11656 | if (controller._closeRequested || stream4._state !== "readable") { |
no test coverage detected
searching dependent graphs…