Unverified Commit 0f947a09 authored by Jackson Gardner's avatar Jackson Gardner Committed by GitHub

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
parent ba141695
...@@ -46,7 +46,8 @@ String generateImports(bool isSkwasm) { ...@@ -46,7 +46,8 @@ String generateImports(bool isSkwasm) {
const skwasmInstance = await skwasm(); const skwasmInstance = await skwasm();
window._flutter_skwasmInstance = skwasmInstance; window._flutter_skwasmInstance = skwasmInstance;
resolve({ resolve({
'skwasm': skwasmInstance.asm ?? skwasmInstance.wasmExports, 'skwasm': skwasmInstance.wasmExports,
'skwasmWrapper': skwasmInstance,
'ffi': { 'ffi': {
'memory': skwasmInstance.wasmMemory, 'memory': skwasmInstance.wasmMemory,
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment