diff --git a/dev/devicelab/lib/framework/browser.dart b/dev/devicelab/lib/framework/browser.dart index 9d4581faec00..a35f6ac0d85d 100644 --- a/dev/devicelab/lib/framework/browser.dart +++ b/dev/devicelab/lib/framework/browser.dart @@ -87,6 +87,10 @@ class Chrome { print('Launching Chrome...'); } + final String jsFlags = options.enableWasmGC ? [ + '--experimental-wasm-gc', + '--experimental-wasm-type-reflection', + ].join(' ') : ''; final bool withDebugging = options.debugPort != null; final List args = [ if (options.userDataDirectory != null) @@ -108,8 +112,7 @@ class Chrome { '--no-default-browser-check', '--disable-default-apps', '--disable-translate', - if (options.enableWasmGC) - '--js-flags=--experimental-wasm-gc', + if (jsFlags.isNotEmpty) '--js-flags=$jsFlags', ]; final io.Process chromeProcess = await _spawnChromiumProcess( diff --git a/packages/flutter_tools/lib/src/web/file_generators/wasm_bootstrap.dart b/packages/flutter_tools/lib/src/web/file_generators/wasm_bootstrap.dart index c2ee17b49602..0d1a755c0f2c 100644 --- a/packages/flutter_tools/lib/src/web/file_generators/wasm_bootstrap.dart +++ b/packages/flutter_tools/lib/src/web/file_generators/wasm_bootstrap.dart @@ -46,7 +46,7 @@ String generateImports(bool isSkwasm) { const skwasmInstance = await skwasm(); window._flutter_skwasmInstance = skwasmInstance; resolve({ - 'skwasm': skwasmInstance.asm, + 'skwasm': skwasmInstance.asm ?? skwasmInstance.wasmExports, 'ffi': { 'memory': skwasmInstance.wasmMemory, }