instanceof WebAssembly.RuntimeError alone is not enough: an error thrown
inside a Worker/iframe realm and re-raised here fails the identity check
because each realm has its own WebAssembly.RuntimeError constructor. The
.name fallback is the cross-realm-safe half — RuntimeError is the class
name the spec fixes for wasm traps, and structured-cloned errors keep it.
True when
erris a WebAssembly runtime trap.instanceof WebAssembly.RuntimeErroralone is not enough: an error thrown inside a Worker/iframe realm and re-raised here fails the identity check because each realm has its ownWebAssembly.RuntimeErrorconstructor. The.namefallback is the cross-realm-safe half —RuntimeErroris the class name the spec fixes for wasm traps, and structured-cloned errors keep it.