(stream4, underlyingByteSource, highWaterMark)
| 11797 | }); |
| 11798 | } |
| 11799 | function SetUpReadableByteStreamControllerFromUnderlyingSource(stream4, underlyingByteSource, highWaterMark) { |
| 11800 | const controller = Object.create(ReadableByteStreamController2.prototype); |
| 11801 | let startAlgorithm; |
| 11802 | let pullAlgorithm; |
| 11803 | let cancelAlgorithm; |
| 11804 | if (underlyingByteSource.start !== void 0) { |
| 11805 | startAlgorithm = () => underlyingByteSource.start(controller); |
| 11806 | } else { |
| 11807 | startAlgorithm = () => void 0; |
| 11808 | } |
| 11809 | if (underlyingByteSource.pull !== void 0) { |
| 11810 | pullAlgorithm = () => underlyingByteSource.pull(controller); |
| 11811 | } else { |
| 11812 | pullAlgorithm = () => promiseResolvedWith(void 0); |
| 11813 | } |
| 11814 | if (underlyingByteSource.cancel !== void 0) { |
| 11815 | cancelAlgorithm = (reason) => underlyingByteSource.cancel(reason); |
| 11816 | } else { |
| 11817 | cancelAlgorithm = () => promiseResolvedWith(void 0); |
| 11818 | } |
| 11819 | const autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize; |
| 11820 | if (autoAllocateChunkSize === 0) { |
| 11821 | throw new TypeError("autoAllocateChunkSize must be greater than 0"); |
| 11822 | } |
| 11823 | SetUpReadableByteStreamController(stream4, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize); |
| 11824 | } |
| 11825 | function SetUpReadableStreamBYOBRequest(request3, controller, view) { |
| 11826 | request3._associatedReadableByteStreamController = controller; |
| 11827 | request3._view = view; |
no test coverage detected
searching dependent graphs…