]> Cypherpunks.ru repositories - gostls13.git/commit
syscall/js: improve import functions
authorRichard Musiol <mail@richard-musiol.de>
Wed, 13 Jun 2018 13:43:54 +0000 (15:43 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 15 Jun 2018 02:09:34 +0000 (02:09 +0000)
commit2809b339b5da46529f3f4529379391f8dd8e3525
tree068a5a88db17937870056234a1377076ef3317d9
parentf70d1e76cc0ed2550d83fbc04356f7d2308044c4
syscall/js: improve import functions

1. Make import functions not use the js.Value type directly,
but only the ref field. This gives more flexibility on the Go side
for the js.Value type, which is a preparation for adding
garbage collection of js.Value.

2. Turn import functions which are methods of js.Value into
package-level functions. This is necessary to make vet happy.

Change-Id: I69959bf1fbea0a0b99a552a1112ffcd0c024e9b8
Reviewed-on: https://go-review.googlesource.com/118656
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/wasm/wasm_exec.js
src/syscall/js/js.go
src/syscall/js/js_js.s