1
0
mirror of https://github.com/golang/go synced 2024-09-30 10:18:32 -06:00
go/misc/wasm
Richard Musiol fec97c0aa7 syscall/js: show goroutine stack traces on deadlock
When using callbacks, it is not necessarily a deadlock if there is no
runnable goroutine, since a callback might still be pending. If there
is no callback pending, Node.js simply exits with exit code zero,
which is not desired if the Go program is still considered running.
This is why an explicit check on exit is used to trigger the "deadlock"
error. This CL makes it so this is Go's normal "deadlock" error, which
includes the stack traces of all goroutines.

Updates #26382

Change-Id: If88486684d0517a64f570009a5ea0ad082679a54
Reviewed-on: https://go-review.googlesource.com/123936
Run-TryBot: Richard Musiol <neelance@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-07-19 19:00:52 +00:00
..
go_js_wasm_exec misc/wasm: add scripts for running WebAssembly binaries 2018-03-30 05:13:31 +00:00
wasm_exec.html misc/wasm: make wasm_exec.js more flexible 2018-05-18 18:16:50 +00:00
wasm_exec.js syscall/js: show goroutine stack traces on deadlock 2018-07-19 19:00:52 +00:00