1
0
mirror of https://github.com/golang/go synced 2024-11-17 06:04:47 -07:00
go/misc
Richard Musiol c468ad0417 syscall/js: replace TypedArrayOf with CopyBytesToGo/CopyBytesToJS
The typed arrays returned by TypedArrayOf were backed by WebAssembly
memory. They became invalid each time we grow the WebAssembly memory.
This made them very error prone and hard to use correctly.

This change removes TypedArrayOf completely and instead introduces
CopyBytesToGo and CopyBytesToJS for copying bytes between a byte
slice and an Uint8Array. This breaking change is still allowed for
the syscall/js package.

Fixes #31980.
Fixes #31812.

Change-Id: I14c76fdd60b48dd517c1593972a56d04965cb272
Reviewed-on: https://go-review.googlesource.com/c/go/+/177537
Run-TryBot: Richard Musiol <neelance@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-24 09:38:37 +00:00
..
android misc/android: fix a typo in README 2019-05-17 06:01:17 +00:00
arm
cgo misc/cgo/test: consolidate tests into fewer cgo source files 2019-05-22 12:52:33 +00:00
chrome/gophertool
ios misc/ios: don't refer to iostest.bash 2019-05-03 13:24:36 +00:00
linkcheck
nacl crypto/ed25519: promote from golang.org/x/crypto/ed25519 2019-05-06 23:23:45 +00:00
reboot cmd/dist: add a test in misc/reboot to verify that the toolchain can self-bootstrap 2019-03-13 21:16:24 +00:00
swig
trace misc/trace: update trace_viewer_full.html 2018-04-26 20:26:23 +00:00
wasm syscall/js: replace TypedArrayOf with CopyBytesToGo/CopyBytesToJS 2019-05-24 09:38:37 +00:00
benchcmp
editors
go.mod misc: add go.mod file 2019-02-27 17:47:31 +00:00