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

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

Issue 472553002: Make class lookup lazy in jni_generator when using lazy method lookup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/testInnerClassNativesMultiple.golden
diff --git a/base/android/jni_generator/testInnerClassNativesMultiple.golden b/base/android/jni_generator/testInnerClassNativesMultiple.golden
index 6a7f04d8bc98128eafdc2a23c375920e98d90b1b..e557e6357fb83074c905d2f8e0aa04dfebdcbed9 100644
--- a/base/android/jni_generator/testInnerClassNativesMultiple.golden
+++ b/base/android/jni_generator/testInnerClassNativesMultiple.golden
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -22,8 +22,16 @@ const char kMyOtherInnerClassClassPath[] =
"org/chromium/TestJni$MyOtherInnerClass";
const char kTestJniClassPath[] = "org/chromium/TestJni";
const char kMyInnerClassClassPath[] = "org/chromium/TestJni$MyInnerClass";
+#if __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
// Leaking this jclass as we cannot use LazyInstance from some threads.
jclass g_TestJni_clazz = NULL;
+jclass TestJni_clazz(JNIEnv*) { return g_TestJni_clazz; }
+#if __clang__
+#pragma clang diagnostic pop
+#endif
} // namespace
@@ -56,21 +64,21 @@ static bool RegisterNativesImpl(JNIEnv* env) {
const int kMethodsMyOtherInnerClassSize =
arraysize(kMethodsMyOtherInnerClass);
- if (env->RegisterNatives(g_MyOtherInnerClass_clazz,
+ if (env->RegisterNatives(MyOtherInnerClass_clazz(env),
kMethodsMyOtherInnerClass,
kMethodsMyOtherInnerClassSize) < 0) {
jni_generator::HandleRegistrationError(
- env, g_MyOtherInnerClass_clazz, __FILE__);
+ env, MyOtherInnerClass_clazz(env), __FILE__);
return false;
}
const int kMethodsMyInnerClassSize = arraysize(kMethodsMyInnerClass);
- if (env->RegisterNatives(g_MyInnerClass_clazz,
+ if (env->RegisterNatives(MyInnerClass_clazz(env),
kMethodsMyInnerClass,
kMethodsMyInnerClassSize) < 0) {
jni_generator::HandleRegistrationError(
- env, g_MyInnerClass_clazz, __FILE__);
+ env, MyInnerClass_clazz(env), __FILE__);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698