IFClite TypeScript API
    Preparing search index...

    Function restashWasmPanicLocation

    • Main-side: re-plant a worker-forwarded stash on this realm's global so the existing #2527 attachWasmPanicLocation gate consumes it unmodified.

      Gated on errorMessage looking like a wasm trap: the worker forwards wasmPanicLocation/wasmPanicAt on ANY {type:'error'} message (a stale stash from an earlier suppressed panic can ride out on an ordinary, non-trap worker error), and re-planting unconditionally would let that stale location sit on globalThis until an unrelated trap-shaped exception consumed it — mislabeling that trap. Only a message that itself looks like a wasm trap is allowed to re-plant.

      Never clobbers an existing, unconsumed stash — a genuine main-thread trap that hasn't been captured yet must win over a worker trap that merely arrived first (the older-looking stash, if stale, is simply dropped later by the TTL check at attach time; this function never overwrites either way).

      Parameters

      • realm: object
      • location: unknown
      • at: unknown
      • errorMessage: string

      Returns void