({
request,
processRequestBodyChunkLength,
processRequestEndOfBody,
processResponse,
processResponseEndOfBody,
processResponseConsumeBody,
useParallelQueue = false,
dispatcher = getGlobalDispatcher()
// undici
})
| 14013 | if (timingInfo === null) { |
| 14014 | return; |
| 14015 | } |
| 14016 | if (!response.timingAllowPassed) { |
| 14017 | timingInfo = createOpaqueTimingInfo({ |
| 14018 | startTime: timingInfo.startTime |
| 14019 | }); |
| 14020 | cacheState = ""; |
| 14021 | } |
| 14022 | timingInfo.endTime = coarsenedSharedCurrentTime(); |
| 14023 | response.timingInfo = timingInfo; |
| 14024 | markResourceTiming( |
| 14025 | timingInfo, |
| 14026 | originalURL.href, |
| 14027 | initiatorType, |
| 14028 | globalThis, |
| 14029 | cacheState |
| 14030 | ); |
| 14031 | } |
| 14032 | var markResourceTiming = performance.markResourceTiming; |
| 14033 | function abortFetch(p, request, responseObject, error) { |
| 14034 | var _a, _b; |
| 14035 | if (p) { |
| 14036 | p.reject(error); |
| 14037 | } |
| 14038 | if (request.body != null && isReadable((_a = request.body) == null ? void 0 : _a.stream)) { |
| 14039 | request.body.stream.cancel(error).catch((err) => { |
| 14040 | if (err.code === "ERR_INVALID_STATE") { |
| 14041 | return; |
| 14042 | } |
| 14043 | throw err; |
| 14044 | }); |
| 14045 | } |
| 14046 | if (responseObject == null) { |
| 14047 | return; |
| 14048 | } |
| 14049 | const response = responseObject[kState]; |
| 14050 | if (response.body != null && isReadable((_b = response.body) == null ? void 0 : _b.stream)) { |
| 14051 | response.body.stream.cancel(error).catch((err) => { |
| 14052 | if (err.code === "ERR_INVALID_STATE") { |
| 14053 | return; |
| 14054 | } |
| 14055 | throw err; |
| 14056 | }); |
| 14057 | } |
| 14058 | } |
| 14059 | function fetching({ |
| 14060 | request, |
| 14061 | processRequestBodyChunkLength, |
| 14062 | processRequestEndOfBody, |
| 14063 | processResponse, |
| 14064 | processResponseEndOfBody, |
| 14065 | processResponseConsumeBody, |
| 14066 | useParallelQueue = false, |
| 14067 | dispatcher = getGlobalDispatcher() |
| 14068 | // undici |
| 14069 | }) { |
| 14070 | var _a, _b, _c; |
| 14071 | assert(dispatcher); |
| 14072 | let taskDestination = null; |
no test coverage detected