MCPcopy Create free account
hub / github.com/angular/dev-infra / onAborted

Function onAborted

github-actions/browserstack/set-browserstack-env.js:14735–14751  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

14733 );
14734 response.body = { stream, source: null, length: null };
14735 fetchParams.controller.onAborted = onAborted;
14736 fetchParams.controller.on("terminated", onAborted);
14737 fetchParams.controller.resume = () => __async(this, null, function* () {
14738 var _a2;
14739 while (true) {
14740 let bytes;
14741 let isFailure;
14742 try {
14743 const { done, value } = yield fetchParams.controller.next();
14744 if (isAborted(fetchParams)) {
14745 break;
14746 }
14747 bytes = done ? void 0 : value;
14748 } catch (err) {
14749 if (fetchParams.controller.ended && !timingInfo.encodedBodySize) {
14750 bytes = void 0;
14751 } else {
14752 bytes = err;
14753 isFailure = true;
14754 }

Callers

nothing calls this directly

Calls 5

isAbortedFunction · 0.70
isReadableFunction · 0.70
isErrorLikeFunction · 0.70
errorMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected