mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 23:13:40 +00:00
wasm: correctly return from run() in wasm_exec.js
Instead of hanging forever, it should return the exit code from os.Exit.
This commit is contained in:
@@ -34,5 +34,8 @@ func ticks() timeUnit {
|
||||
return timeUnit(0)
|
||||
}
|
||||
|
||||
func beforeExit() {
|
||||
func mainReturnExit() {
|
||||
// Don't exit explicitly here. We can't (there is no environment with an
|
||||
// exit call) but also it's not needed. We can just let _start and main.main
|
||||
// return to the caller.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user