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

Function lazyllhttp

github-actions/browserstack/set-browserstack-env.js:5968–6019  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5966 var kSocketUsed = Symbol("kSocketUsed");
5967 var extractBody;
5968 function lazyllhttp() {
5969 return __async(this, null, function* () {
5970 const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0;
5971 let mod;
5972 try {
5973 mod = yield WebAssembly.compile(require_llhttp_simd_wasm());
5974 } catch (e) {
5975 mod = yield WebAssembly.compile(llhttpWasmData || require_llhttp_wasm());
5976 }
5977 return yield WebAssembly.instantiate(mod, {
5978 env: {
5979 /* eslint-disable camelcase */
5980 wasm_on_url: (p, at2, len) => {
5981 return 0;
5982 },
5983 wasm_on_status: (p, at2, len) => {
5984 assert(currentParser.ptr === p);
5985 const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
5986 return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0;
5987 },
5988 wasm_on_message_begin: (p) => {
5989 assert(currentParser.ptr === p);
5990 return currentParser.onMessageBegin() || 0;
5991 },
5992 wasm_on_header_field: (p, at2, len) => {
5993 assert(currentParser.ptr === p);
5994 const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
5995 return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0;
5996 },
5997 wasm_on_header_value: (p, at2, len) => {
5998 assert(currentParser.ptr === p);
5999 const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
6000 return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0;
6001 },
6002 wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {
6003 assert(currentParser.ptr === p);
6004 return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0;
6005 },
6006 wasm_on_body: (p, at2, len) => {
6007 assert(currentParser.ptr === p);
6008 const start = at2 - currentBufferPtr + currentBufferRef.byteOffset;
6009 return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0;
6010 },
6011 wasm_on_message_complete: (p) => {
6012 assert(currentParser.ptr === p);
6013 return currentParser.onMessageComplete() || 0;
6014 }
6015 /* eslint-enable camelcase */
6016 }
6017 });
6018 });
6019 }
6020 var llhttpInstance = null;
6021 var llhttpPromise = lazyllhttp();
6022 llhttpPromise.catch();

Callers 1

""Function · 0.70

Calls 8

__asyncFunction · 0.70
onStatusMethod · 0.45
onMessageBeginMethod · 0.45
onHeaderFieldMethod · 0.45
onHeaderValueMethod · 0.45
onHeadersCompleteMethod · 0.45
onBodyMethod · 0.45
onMessageCompleteMethod · 0.45

Tested by

no test coverage detected