mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
mobile/bind: stop tracking foreign objects in the Go reference tracker
ToRefNum only handles Go objects, but it can be passed foreign object proxies as well. Add a check whether the object is a proxy, and if so, simply return its refnum and don't track it. Change-Id: Ib17bd11b48e472c3bec0e5fb06661b201c3dfa97 Reviewed-on: https://go-review.googlesource.com/20681 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
@@ -497,4 +497,9 @@ public class SeqTest extends InstrumentationTestCase {
|
||||
Testpkg.WithImportedI(i);
|
||||
Testpkg.WithImportedS(s);
|
||||
}
|
||||
|
||||
public void testIDup() {
|
||||
Testpkg.I want = new AnI();
|
||||
assertTrue("java object passed through Go should not be wrapped", want == Testpkg.IDup(want));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user