From 943fd287247f9d23d463a24e8eb4b0f666900c43 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 11 Oct 2016 14:50:34 -0700 Subject: wasmTableSize of 0 is allowed --- src/js/wasm.js-post.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index 58e4c75cd..f093ff64d 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -283,7 +283,8 @@ function integrateWasmJS(Module) { // import table if (!env['table']) { - var TABLE_SIZE = Module['wasmTableSize'] || 1024; + var TABLE_SIZE = Module['wasmTableSize']; + if (TABLE_SIZE === undefined) TABLE_SIZE = 1024; // works in binaryen interpreter at least if (typeof WebAssembly === 'object' && typeof WebAssembly.Table === 'function') { env['table'] = new WebAssembly.Table({ initial: TABLE_SIZE, maximum: TABLE_SIZE, element: 'anyfunc' }); } else { -- cgit v1.2.3