(_0)
| 16029 | if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { |
| 16030 | throw webidl.errors.exception({ |
| 16031 | header: prefix, |
| 16032 | message: "Response body is locked or disturbed" |
| 16033 | }); |
| 16034 | } |
| 16035 | const clonedResponse = cloneResponse(innerResponse); |
| 16036 | const bodyReadPromise = createDeferredPromise(); |
| 16037 | if (innerResponse.body != null) { |
| 16038 | const stream = innerResponse.body.stream; |
| 16039 | const reader = stream.getReader(); |
| 16040 | readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject); |
| 16041 | } else { |
| 16042 | bodyReadPromise.resolve(void 0); |
| 16043 | } |
| 16044 | const operations = []; |
| 16045 | const operation = { |
| 16046 | type: "put", |
| 16047 | // 14. |
| 16048 | request: innerRequest, |
| 16049 | // 15. |
| 16050 | response: clonedResponse |
| 16051 | // 16. |
| 16052 | }; |
| 16053 | operations.push(operation); |
| 16054 | const bytes = yield bodyReadPromise.promise; |
| 16055 | if (clonedResponse.body != null) { |
| 16056 | clonedResponse.body.source = bytes; |
| 16057 | } |
| 16058 | const cacheJobPromise = createDeferredPromise(); |
| 16059 | let errorData = null; |
| 16060 | try { |
| 16061 | __privateMethod(this, _batchCacheOperations, batchCacheOperations_fn).call(this, operations); |
| 16062 | } catch (e) { |
| 16063 | errorData = e; |
| 16064 | } |
| 16065 | queueMicrotask(() => { |
| 16066 | if (errorData === null) { |
| 16067 | cacheJobPromise.resolve(); |
| 16068 | } else { |
| 16069 | cacheJobPromise.reject(errorData); |
| 16070 | } |
| 16071 | }); |
| 16072 | return cacheJobPromise.promise; |
| 16073 | }); |
| 16074 | } |
| 16075 | delete(_0) { |
no test coverage detected