(stream, chunk, done)
| 2256 | } |
| 2257 | |
| 2258 | function readableStreamFulfillReadRequest(stream, chunk, done) { |
| 2259 | assert(readableStreamHasDefaultReader(stream)); |
| 2260 | const { |
| 2261 | reader, |
| 2262 | } = stream[kState]; |
| 2263 | assert(reader[kState].readRequests.length); |
| 2264 | const readRequest = ArrayPrototypeShift(reader[kState].readRequests); |
| 2265 | |
| 2266 | // TODO(@jasnell): It's not clear under what exact conditions done |
| 2267 | // will be true here. The spec requires this check but none of the |
| 2268 | // WPT's or other tests trigger it. Will need to investigate how to |
| 2269 | // get coverage for this. |
| 2270 | if (done) |
| 2271 | readRequest[kClose](); |
| 2272 | else |
| 2273 | readRequest[kChunk](chunk); |
| 2274 | } |
| 2275 | |
| 2276 | function readableStreamFulfillReadIntoRequest(stream, chunk, done) { |
| 2277 | assert(readableStreamHasBYOBReader(stream)); |
no test coverage detected
searching dependent graphs…