MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / registerModuleAndForward

Function registerModuleAndForward

packages/wasm/src/index.ts:206–219  ·  view source on GitHub ↗

* Registers a WASM module and forwards its debug image to the parent thread.

(
  module: WebAssembly.Module,
  url: string,
  workerSelf: MinimalDedicatedWorkerGlobalScope,
)

Source from the content-addressed store, hash-verified

204 * Registers a WASM module and forwards its debug image to the parent thread.
205 */
206function registerModuleAndForward(
207 module: WebAssembly.Module,
208 url: string,
209 workerSelf: MinimalDedicatedWorkerGlobalScope,
210): void {
211 const image = registerModule(module, url);
212
213 if (image) {
214 workerSelf.postMessage({
215 _sentryMessage: true,
216 _sentryWasmImages: [image],
217 });
218 }
219}

Callers 1

Calls 2

registerModuleFunction · 0.90
postMessageMethod · 0.65

Tested by

no test coverage detected