()
| 1239 | } |
| 1240 | |
| 1241 | close() { |
| 1242 | if (!isReadableByteStreamController(this)) |
| 1243 | throw new ERR_INVALID_THIS('ReadableByteStreamController'); |
| 1244 | if (this[kState].closeRequested) |
| 1245 | throw new ERR_INVALID_STATE.TypeError('Controller is already closed'); |
| 1246 | if (this[kState].stream[kState].state !== 'readable') |
| 1247 | throw new ERR_INVALID_STATE.TypeError('ReadableStream is already closed'); |
| 1248 | readableByteStreamControllerClose(this); |
| 1249 | } |
| 1250 | |
| 1251 | /** |
| 1252 | * @param {ArrayBufferView} chunk |
nothing calls this directly
no test coverage detected