wasm: Look for both loadWebAssemblyModule and loadSideModule
See https://github.com/emscripten-core/emscripten/pull/12969
This commit is contained in:
parent
bd5a9a813c
commit
5008700735
1 changed files with 7 additions and 1 deletions
|
|
@ -878,8 +878,14 @@ class Language {
|
|||
}));
|
||||
}
|
||||
|
||||
// emscripten-core/emscripten#12969
|
||||
const loadModule =
|
||||
typeof loadSideModule === 'function'
|
||||
? loadSideModule
|
||||
: loadWebAssemblyModule;
|
||||
|
||||
return bytes
|
||||
.then(bytes => loadSideModule(bytes, {loadAsync: true}))
|
||||
.then(bytes => loadModule(bytes, {loadAsync: true}))
|
||||
.then(mod => {
|
||||
const symbolNames = Object.keys(mod)
|
||||
const functionName = symbolNames.find(key =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue