From 0b30f030f052b5f3e7ac62ffbabc4c7ba1e38e87 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 18 Dec 2025 09:23:08 -0800 Subject: [PATCH] [SPLIT_MODULE] Fix `wasmRawExports` to actually be the raw exports. NFC We don't want the raw exports include things like `Asyncify.instrumentWasmExports` or `relocateExports`. They should be the actual raw exports. See #25621 --- src/preamble.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/preamble.js b/src/preamble.js index 1df464281ee21..25bb5f0ebbd1e 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -724,6 +724,9 @@ function getWasmImports() { #endif var origExports = wasmExports; #endif +#if SPLIT_MODULE + wasmRawExports = wasmExports; +#endif #if ASYNCIFY wasmExports = Asyncify.instrumentWasmExports(wasmExports); @@ -739,14 +742,10 @@ function getWasmImports() { #endif #endif - #if ABORT_ON_WASM_EXCEPTIONS wasmExports = instrumentWasmExportsWithAbort(wasmExports); #endif -#if SPLIT_MODULE - wasmRawExports = wasmExports; -#endif #if MEMORY64 || CAN_ADDRESS_2GB wasmExports = applySignatureConversions(wasmExports); #endif