mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind/java: initialize seq machinery from Java
This ensures that the java bindings are ready before any calls are made by user code. As a bonus, the JNIEnv* is from the Seq class so I believe no tricks are required to find the right class loader. Fixes golang/go#10903. Change-Id: I33b3b39cef6cc2da36e271de882ba8d26610ea34 Reviewed-on: https://go-review.googlesource.com/10296 Reviewed-by: Elias Naur <elias.naur@gmail.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
@@ -66,6 +66,12 @@ public class Seq {
|
||||
return tracker.get(refnum);
|
||||
}
|
||||
|
||||
static {
|
||||
initSeq();
|
||||
}
|
||||
|
||||
static native void initSeq();
|
||||
|
||||
// Informs the Go ref tracker that Java is done with this ref.
|
||||
static native void destroyRef(int refnum);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user