Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2221)

Unified Diff: base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden

Issue 2154293002: jni_generator: handle inner class natives properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden
diff --git a/base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden b/base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden
index 0a890e7c338dfb9d901296172e69ec456076a6df..a0675ea70b52748daccc82b70684983f44916086 100644
--- a/base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden
+++ b/base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden
@@ -22,6 +22,9 @@ const char kMyOtherInnerClassClassPath[] =
"org/chromium/TestJni$MyOtherInnerClass";
const char kTestJniClassPath[] = "org/chromium/TestJni";
// Leaking this jclass as we cannot use LazyInstance from some threads.
+jclass g_MyOtherInnerClass_clazz = NULL;
+#define MyOtherInnerClass_clazz(env) g_MyOtherInnerClass_clazz
+// Leaking this jclass as we cannot use LazyInstance from some threads.
jclass g_TestJni_clazz = NULL;
#define TestJni_clazz(env) g_TestJni_clazz
@@ -62,6 +65,8 @@ static const JNINativeMethod kMethodsTestJni[] = {
static bool RegisterNativesImpl(JNIEnv* env) {
+ g_MyOtherInnerClass_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
+ base::android::GetClass(env, kMyOtherInnerClassClassPath).obj()));
g_TestJni_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
base::android::GetClass(env, kTestJniClassPath).obj()));

Powered by Google App Engine
This is Rietveld 408576698