MCPcopy Create free account
hub / github.com/angular/dev-infra / [kDestroy]

Method [kDestroy]

github-actions/browserstack/set-browserstack-env.js:8063–8087  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

8061 if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) {
8062 this[kNeedDrain] = 2;
8063 }
8064 return this[kNeedDrain] < 2;
8065 }
8066 [kClose]() {
8067 return __async(this, null, function* () {
8068 return new Promise((resolve2) => {
8069 if (this[kSize]) {
8070 this[kClosedResolve] = resolve2;
8071 } else {
8072 resolve2(null);
8073 }
8074 });
8075 });
8076 }
8077 [kDestroy](err) {
8078 return __async(this, null, function* () {
8079 return new Promise((resolve2) => {
8080 const requests = this[kQueue].splice(this[kPendingIdx]);
8081 for (let i = 0; i < requests.length; i++) {
8082 const request = requests[i];
8083 util.errorRequest(this, request, err);
8084 }
8085 const callback = () => {
8086 if (this[kClosedResolve]) {
8087 this[kClosedResolve]();
8088 this[kClosedResolve] = null;
8089 }
8090 resolve2(null);

Callers

nothing calls this directly

Calls 7

__asyncFunction · 0.70
__privateGetFunction · 0.70
destroyMethod · 0.45
shiftMethod · 0.45
onErrorMethod · 0.45
pushMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected