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

Unified Diff: base/android/jni_generator/testJNIInitNativeNameOption.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/testJNIInitNativeNameOption.golden
diff --git a/base/android/jni_generator/testJNIInitNativeNameOption.golden b/base/android/jni_generator/testJNIInitNativeNameOption.golden
index 0d5d3c6137092756fa36a33bbd76109a7ed3a7c3..1ddaa665e4e1b7fe2f570b6ce6893bb3fe89caba 100644
--- a/base/android/jni_generator/testJNIInitNativeNameOption.golden
+++ b/base/android/jni_generator/testJNIInitNativeNameOption.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.
@@ -19,8 +19,16 @@
// Step 1: forward declarations.
namespace {
const char kTestClassPath[] = "org/chromium/example/jni_generator/Test";
+#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_Test_clazz = NULL;
+jclass Test_clazz(JNIEnv*) { return g_Test_clazz; }
+#if __clang__
+#pragma clang diagnostic pop
+#endif
} // namespace
@@ -49,11 +57,11 @@ static bool RegisterNativesImpl(JNIEnv* env, jclass clazz) {
const int kMethodsTestSize = arraysize(kMethodsTest);
- if (env->RegisterNatives(g_Test_clazz,
+ if (env->RegisterNatives(Test_clazz(env),
kMethodsTest,
kMethodsTestSize) < 0) {
jni_generator::HandleRegistrationError(
- env, g_Test_clazz, __FILE__);
+ env, Test_clazz(env), __FILE__);
return false;
}
« no previous file with comments | « base/android/jni_generator/testInnerClassNativesMultiple.golden ('k') | base/android/jni_generator/testJarJarRemapping.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698