From fd0160dafa25699404c1603adfcf965c75115854 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 28 Aug 2016 11:17:36 -0700 Subject: import memoryBase and tableBase --- src/js/wasm.js-post.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/js/wasm.js-post.js') diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index d691c22f2..1c5e6b0b1 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -212,8 +212,11 @@ function integrateWasmJS(Module) { info.global = global; info.env = env; - if (!('memInitBase' in env)) { - env['memInitBase'] = STATIC_BASE; // tell the memory segments where to place themselves + if (!('memoryBase' in env)) { + env['memoryBase'] = STATIC_BASE; // tell the memory segments where to place themselves + } + if (!('tableBase' in env)) { + env['tableBase'] = 0; // tell the memory segments where to place themselves } wasmJS['providedTotalMemory'] = Module['buffer'].byteLength; -- cgit v1.2.3