-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
Version of emscripten/emsdk:
4.0.15 (09f5255)
From the generated module JS, stripped to the relevant parts:
async function createWasm() {
...
/** @param {WebAssembly.Module=} module*/
function receiveInstance(instance, module) {
wasmExports = instance.exports;
wasmExports = applySignatureConversions(wasmExports);
assignWasmExports(wasmExports);
return wasmExports;
}
...
if (Module['instantiateWasm']) {
return new Promise((resolve, reject) => {
try {
Module['instantiateWasm'](info, (mod, inst) => {
resolve(receiveInstance(mod, inst));
});
} catch(e) {
err(`Module.instantiateWasm callback failed with error: ${e}`);
reject(e);
}
});
}
...
}
Note that Module['instantiateWasm']
is called with (mod, inst), and that's passed on as-is to receiveInstance()
, but the latter is declared as taking its args in the reverse order.
Metadata
Metadata
Assignees
Labels
No labels