(buf: ArrayBuffer, byteLen: number, dropped: number)
| 384 | } |
| 385 | |
| 386 | function buildBatch(buf: ArrayBuffer, byteLen: number, dropped: number): BackendEventBatch { |
| 387 | const bytes = new Uint8Array(buf, 0, byteLen); |
| 388 | let released = false; |
| 389 | return { |
| 390 | bytes, |
| 391 | droppedBatches: dropped, |
| 392 | release: () => { |
| 393 | if (released) return; |
| 394 | released = true; |
| 395 | if (!started || disposed) return; |
| 396 | eventPool.push(buf); |
| 397 | }, |
| 398 | }; |
| 399 | } |
| 400 | |
| 401 | function emitInitialResizeIfPossible(): void { |
| 402 | if (!started || discardBuffer === null) return; |
no test coverage detected