Update the wasm bootstrap to allow access to the emscripten wrapper to skwasm. (#135723)

Some upcoming engine changes will bind to a function provided by the emscripten JS wrapper around skwasm, rather than just the wasm module itself. This will make sure not to break the benchmarks when those engine changes land. See https://github.com/flutter/engine/pull/46388
This commit is contained in:
Jackson Gardner 2023-09-29 10:41:45 -07:00 committed by GitHub
parent ba1416954a
commit 0f947a09ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,8 @@ String generateImports(bool isSkwasm) {
const skwasmInstance = await skwasm();
window._flutter_skwasmInstance = skwasmInstance;
resolve({
'skwasm': skwasmInstance.asm ?? skwasmInstance.wasmExports,
'skwasm': skwasmInstance.wasmExports,
'skwasmWrapper': skwasmInstance,
'ffi': {
'memory': skwasmInstance.wasmMemory,
}