• Richard Musiol's avatar
    syscall/js: use stable references to JavaScript values · 8997ec1c
    Richard Musiol authored
    This commit changes how JavaScript values are referenced by Go code.
    After this change, a JavaScript value is always represented by the same
    ref, even if passed multiple times from JavaScript to Go. This allows
    Go's == operator to work as expected on js.Value (strict equality).
    Additionally, the performance of some operations of the syscall/js
    package got improved by saving additional roundtrips to JavaScript code.
    
    Fixes #25802.
    
    Change-Id: Ide6ffe66c6aa1caf5327a2d3ddbe48fe7c180461
    Reviewed-on: https://go-review.googlesource.com/120561
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    8997ec1c
Name
Last commit
Last update
..
all Loading commit data...
internal Loading commit data...
testdata Loading commit data...
README Loading commit data...
asmdecl.go Loading commit data...
assign.go Loading commit data...
atomic.go Loading commit data...
bool.go Loading commit data...
buildtag.go Loading commit data...
cgo.go Loading commit data...
composite.go Loading commit data...
copylock.go Loading commit data...
dead.go Loading commit data...
deadcode.go Loading commit data...
doc.go Loading commit data...
httpresponse.go Loading commit data...
lostcancel.go Loading commit data...
main.go Loading commit data...
method.go Loading commit data...
nilfunc.go Loading commit data...
print.go Loading commit data...
rangeloop.go Loading commit data...
shadow.go Loading commit data...
shift.go Loading commit data...
structtag.go Loading commit data...
tests.go Loading commit data...
types.go Loading commit data...
unsafeptr.go Loading commit data...
unused.go Loading commit data...
vet_test.go Loading commit data...