Skip to content

Commit

Permalink
resolve compile failure with go1.13: dennwc#48
Browse files Browse the repository at this point in the history
  • Loading branch information
tangfeixiong committed Jan 24, 2020
1 parent 5d59134 commit 2a6c6ff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/js_wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ func funcOf(fnc func(this Ref, refs []Ref) interface{}) Func {
}

func typedArrayOf(slice interface{}) Ref {
return js.TypedArrayOf(slice).Value
// return js.TypedArrayOf(slice).Value
var ref js.Value
js.CopyBytesToJS(ref, slice.([]byte))
return ref
}

func releaseTypedArray(v Ref) {
js.TypedArray{v}.Release()
// js.TypedArray{v}.Release()
v = js.Null()
}

0 comments on commit 2a6c6ff

Please sign in to comment.