(Go) Don't delete binding after it is called. (#337)

This commit is contained in:
Beng Tan
2020-04-08 01:36:19 +08:00
committed by GitHub
parent cccd963640
commit d62dd8e3a7

View File

@@ -229,7 +229,6 @@ func _webviewDispatchGoCallback(index unsafe.Pointer) {
func _webviewBindingGoCallback(w C.webview_t, id *C.char, req *C.char, index uintptr) {
m.Lock()
f := bindings[uintptr(index)]
delete(bindings, uintptr(index))
m.Unlock()
jsString := func(v interface{}) string { b, _ := json.Marshal(v); return string(b) }
status, result := 0, ""