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

Method onMessageBegin

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

Source from the content-addressed store, hash-verified

6192 currentBufferSize = Math.ceil(data.length / 4096) * 4096;
6193 currentBufferPtr = llhttp.malloc(currentBufferSize);
6194 }
6195 new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data);
6196 try {
6197 let ret;
6198 try {
6199 currentBufferRef = data;
6200 currentParser = this;
6201 ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length);
6202 } catch (err) {
6203 throw err;
6204 } finally {
6205 currentParser = null;
6206 currentBufferRef = null;
6207 }
6208 const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr;
6209 if (ret !== constants3.ERROR.OK) {
6210 const body = data.subarray(offset);
6211 if (ret === constants3.ERROR.PAUSED_UPGRADE) {

Callers 1

lazyllhttpFunction · 0.45

Calls 2

destroyMethod · 0.45
onResponseStartedMethod · 0.45

Tested by

no test coverage detected