mirror of
https://github.com/golang/go
synced 2024-11-11 21:20:21 -07:00
misc/wasm: fix panic on os.Stdout.Sync() in the browser
Before this change running os.Stdout.Sync() in the browser would panic the application with: panic: syscall/js: Value.Call: property fsync is not a function, got undefined Afterwards Sync() becomes a noop for compatibility reasons. Change-Id: I1fcef694beb35fdee3173f87371e1ff233b15d32 Reviewed-on: https://go-review.googlesource.com/c/143138 Reviewed-by: Richard Musiol <neelance@gmail.com> Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
2e88689168
commit
ecccdccf3e
@ -59,6 +59,9 @@
|
||||
err.code = "ENOSYS";
|
||||
callback(err);
|
||||
},
|
||||
fsync(fd, callback) {
|
||||
callback(null);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user