diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-03-04 22:00:47 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-03-04 22:00:47 -0800 |
commit | e9be280e476026af4ecb0b0bc839e0a9d967168d (patch) | |
tree | 86a0a230a3c892064678d4a0af5deb99f43c5d90 /src/js | |
parent | a0fe0c518d95a90137d7a28898add5eee1532142 (diff) | |
download | binaryen-e9be280e476026af4ecb0b0bc839e0a9d967168d.tar.gz binaryen-e9be280e476026af4ecb0b0bc839e0a9d967168d.tar.bz2 binaryen-e9be280e476026af4ecb0b0bc839e0a9d967168d.zip |
place NaN and Infinity on global
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/wasm.js-post.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index 347f85923..b2ec40b00 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -124,7 +124,11 @@ function integrateWasmJS(Module) { // Load the wasm module var binary = Module['readBinary'](Module['wasmCodeFile']); // Create an instance of the module using native support in the JS engine. - info['global'] = { 'Math': global.Math }; + info['global'] = { + 'Math': global.Math, + 'NaN': NaN, + 'Infinity': Infinity + }; info['env'] = env; var instance; instance = Wasm.instantiateModule(binary, info); |