wasm: support //go:wasmexport functions after a call to time.Sleep

This fixes a bug where `//go:wasmexport` functions would not be allowed
anymore after a call to `time.Sleep` (when using `-buildmode=default`).
This commit is contained in:
Ayke van Laethem
2024-10-30 12:12:10 +01:00
committed by Ayke
parent 8ff97bdedd
commit 04a7baec3e
4 changed files with 20 additions and 26 deletions
+6
View File
@@ -1,5 +1,7 @@
package main
import "time"
func init() {
println("called init")
}
@@ -8,6 +10,10 @@ func init() {
func callTestMain()
func main() {
// Check that exported functions can still be called after calling
// time.Sleep.
time.Sleep(time.Millisecond)
// main.main is not used when using -buildmode=c-shared.
callTestMain()
}