Provide the wasm module correctly to the instantiateWasm callback

The second parameter to the onDone callback in istantiateWasm was
missing in qwasmjsrunner.js, which prevented the wasm module from
working on the threaded qt build.

Change-Id: I5d1be7a2e0d8043112f304b4d2530acdaae7b398
Reviewed-by: David Skoland <david.skoland@qt.io>
This commit is contained in:
Mikolaj Boc 2022-09-30 16:17:41 +02:00 committed by Mikołaj Boc
parent e3358e2336
commit bafbffb033

View File

@ -166,7 +166,7 @@ export class CompiledModule {
const instanceParams = {};
instanceParams.instantiateWasm = async (imports, onDone) => {
try {
onDone(await WebAssembly.instantiate(this.#wasm, imports));
onDone(await WebAssembly.instantiate(this.#wasm, imports), this.#wasm);
} catch (e) {
params?.onInstantiationError?.(e);
}