summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-07-09 19:09:09 -0700
committerGitHub <noreply@github.com>2019-07-09 19:09:09 -0700
commitf7ebd218d42dd33d512625c2c8f05a5aee1065ab (patch)
tree816fb41d479e88988486f16234c4d4395b4ae8a0
parent03a883356bd3aba53b2dfadb424d53b1db04a842 (diff)
downloadbinaryen-f7ebd218d42dd33d512625c2c8f05a5aee1065ab.tar.gz
binaryen-f7ebd218d42dd33d512625c2c8f05a5aee1065ab.tar.bz2
binaryen-f7ebd218d42dd33d512625c2c8f05a5aee1065ab.zip
Support wasm files without exported memory in scripts/fuzz_shell.js (#2210)
-rw-r--r--scripts/fuzz_shell.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/fuzz_shell.js b/scripts/fuzz_shell.js
index 4aafdacce..a596bc494 100644
--- a/scripts/fuzz_shell.js
+++ b/scripts/fuzz_shell.js
@@ -178,7 +178,9 @@ var instance = new WebAssembly.Instance(new WebAssembly.Module(binary), imports)
// Handle the exports.
var exports = instance.exports;
exports = Bysyncify.instrumentExports(exports);
-var view = new Int32Array(exports.memory.buffer);
+if (exports.memory) {
+ var view = new Int32Array(exports.memory.buffer);
+}
// Run the wasm.
var sortedExports = [];