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

Function writeBlob

github-actions/browserstack/set-browserstack-env.js:6858–6882  ·  view source on GitHub ↗
(abort, body, client, request, socket, contentLength, header, expectsPayload)

Source from the content-addressed store, hash-verified

6856 try {
6857 if (!writer.write(chunk) && this.pause) {
6858 this.pause();
6859 }
6860 } catch (err) {
6861 util.destroy(this, err);
6862 }
6863 };
6864 const onDrain = function() {
6865 if (finished) {
6866 return;
6867 }
6868 if (body.resume) {
6869 body.resume();
6870 }
6871 };
6872 const onClose = function() {
6873 queueMicrotask(() => {
6874 body.removeListener("error", onFinished);
6875 });
6876 if (!finished) {
6877 const err = new RequestAbortedError();
6878 queueMicrotask(() => onFinished(err));
6879 }
6880 };
6881 const onFinished = function(err) {
6882 if (finished) {
6883 return;
6884 }
6885 finished = true;

Callers 2

writeH1Function · 0.70
writeBodyH2Function · 0.70

Calls 7

__asyncFunction · 0.70
abortFunction · 0.70
arrayBufferMethod · 0.45
writeMethod · 0.45
onBodySentMethod · 0.45
onRequestSentMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected