summaryrefslogtreecommitdiff
path: root/src/js/wasm.js-post.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/wasm.js-post.js')
-rw-r--r--src/js/wasm.js-post.js6
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);