diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-03-04 21:38:59 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-03-04 21:38:59 -0800 |
commit | c5f98754c9c2938c1eaa493f8103bff11ebab628 (patch) | |
tree | b765da663ec036b8fa6af7958beb18caedc61009 /src/js/wasm.js-post.js | |
parent | c4ba893ba88b7560c31d6c5c7cc0b93a3ebaeab7 (diff) | |
download | binaryen-c5f98754c9c2938c1eaa493f8103bff11ebab628.tar.gz binaryen-c5f98754c9c2938c1eaa493f8103bff11ebab628.tar.bz2 binaryen-c5f98754c9c2938c1eaa493f8103bff11ebab628.zip |
WASM => Wasm
Diffstat (limited to 'src/js/wasm.js-post.js')
-rw-r--r-- | src/js/wasm.js-post.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index 4848da47b..539397ca6 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -108,7 +108,7 @@ function integrateWasmJS(Module) { } } - if (typeof WASM === 'object' || typeof wasmEval === 'function') { + if (typeof Wasm === 'object') { // Provide an "asm.js function" for the application, called to "link" the asm.js module. We instantiate // the wasm module at that time, and it receives imports and provides exports and so forth, the app // doesn't need to care that it is wasm and not asm. @@ -119,13 +119,7 @@ function integrateWasmJS(Module) { info['global'] = { 'Math': global.Math }; info['env'] = env; var instance; - if (typeof WASM === 'object') { - instance = WASM.instantiateModule(binary, info); - } else if (typeof wasmEval === 'function') { - instance = wasmEval(binary.buffer, info); - } else { - throw 'how to wasm?'; - } + instance = Wasm.instantiateModule(binary, info); mergeMemory(instance.memory); applyMappedGlobals(); |