diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-10-11 14:50:34 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-10-11 15:01:04 -0700 |
commit | 943fd287247f9d23d463a24e8eb4b0f666900c43 (patch) | |
tree | e3c574337e8d64606ab63844f2886cbe00306b23 /src/js | |
parent | 6e04c61c78cdf8196b6944c290041611d1f68d2d (diff) | |
download | binaryen-943fd287247f9d23d463a24e8eb4b0f666900c43.tar.gz binaryen-943fd287247f9d23d463a24e8eb4b0f666900c43.tar.bz2 binaryen-943fd287247f9d23d463a24e8eb4b0f666900c43.zip |
wasmTableSize of 0 is allowed
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/wasm.js-post.js | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |