diff options
| author | Richard Musiol <mail@richard-musiol.de> | 2019-10-26 21:01:32 +0200 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-11-04 22:50:43 +0000 |
| commit | 54e6ba6724dfde355070238f9abc16362cac2e3d (patch) | |
| tree | 545a12103881cfa87f536865a8cf0bfd9e85b731 /src/net/http/export_test.go | |
| parent | 063d0f11e535edf61d1e0b4ba16cfeae0f312bcf (diff) | |
| download | go-54e6ba6724dfde355070238f9abc16362cac2e3d.tar.xz | |
syscall/js: garbage collect references to JavaScript values
The js.Value struct now contains a pointer, so a finalizer can
determine if the value is not referenced by Go any more.
Unfortunately this breaks Go's == operator with js.Value. This change
adds a new Equal method to check for the equality of two Values.
This is a breaking change. The == operator is now disallowed to
not silently break code.
Additionally the helper methods IsUndefined, IsNull and IsNaN got added.
Fixes #35111
Change-Id: I58a50ca18f477bf51a259c668a8ba15bfa76c955
Reviewed-on: https://go-review.googlesource.com/c/go/+/203600
Run-TryBot: Richard Musiol <neelance@gmail.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/http/export_test.go')
0 files changed, 0 insertions, 0 deletions
