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.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js
index dcffb1ee8..d691c22f2 100644
--- a/src/js/wasm.js-post.js
+++ b/src/js/wasm.js-post.js
@@ -274,10 +274,13 @@ function integrateWasmJS(Module) {
global = fixImports(global);
env = fixImports(env);
- // import memory
+ // import memory and table
if (!env['memory']) {
env['memory'] = providedBuffer;
}
+ if (!env['table']) {
+ env['table'] = new Array(1024);
+ }
// try the methods. each should return the exports if it succeeded