summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/wasm.js-post.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js
index a4bc35f97..1fc0509cb 100644
--- a/src/js/wasm.js-post.js
+++ b/src/js/wasm.js-post.js
@@ -186,6 +186,9 @@ function integrateWasmJS(Module) {
instance = new WebAssembly.Instance(new WebAssembly.Module(getBinary()), info)
} catch (e) {
Module['printErr']('failed to compile wasm module: ' + e);
+ if (e.toString().indexOf('imported Memory with incompatible size') >= 0) {
+ Module['printErr']('Memory size incompatibility issues may be due to changing TOTAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set TOTAL_MEMORY at runtime to something smaller than it was at compile time).');
+ }
return false;
}
exports = instance.exports;