mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 20:14:04 +00:00
wasm: tidy up wasm_exec.js a bit
This commit is contained in:
committed by
Damian Gryski
parent
b7d91e2f33
commit
258dac2324
@@ -530,11 +530,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const go = new Go();
|
const go = new Go();
|
||||||
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {
|
WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then(async (result) => {
|
||||||
go.run(result.instance).then((result) => {
|
let exitCode = await go.run(result.instance);
|
||||||
process.exit(result);
|
process.exit(exitCode);
|
||||||
}).
|
|
||||||
catch((e) => { throw e });
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user