diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-08-28 11:17:36 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 09:55:57 -0700 |
commit | fd0160dafa25699404c1603adfcf965c75115854 (patch) | |
tree | 0a4e0d26d6821637df1885a13ed32b6a6b9fd510 /src/js/wasm.js-post.js | |
parent | 28767f631cfdae86ff16ca112bc5b1855b1368c4 (diff) | |
download | binaryen-fd0160dafa25699404c1603adfcf965c75115854.tar.gz binaryen-fd0160dafa25699404c1603adfcf965c75115854.tar.bz2 binaryen-fd0160dafa25699404c1603adfcf965c75115854.zip |
import memoryBase and tableBase
Diffstat (limited to 'src/js/wasm.js-post.js')
-rw-r--r-- | src/js/wasm.js-post.js | 7 |
1 files changed, 5 insertions, 2 deletions
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; |