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

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

Issue 147533004: Remove unneeded JNI registrations. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Fix android webview build issues. Created 6 years, 9 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 6b85ea9c7f7fdfde57f7c95f543944173445d733..ad8a4a051d8d13ce4c2d273bf1d877d2047f9c7e 100644
--- a/base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden
+++ b/base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden
@@ -16,62 +16,24 @@
// Step 1: forward declarations.
namespace {
-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_TestJni_clazz = NULL;
} // namespace
+extern "C"{
+
static jint Init(JNIEnv* env, jobject jcaller);
+__attribute__((alias("Init"), visibility("default"))) jint
+ Java_org_chromium_TestJni_nativeInit(JNIEnv* env, jobject jcaller);
static jint Init(JNIEnv* env, jobject jcaller);
+__attribute__((alias("Init"), visibility("default"))) jint
+ Java_org_chromium_TestJni_00024MyOtherInnerClass_nativeInit(JNIEnv* env,
+ jobject jcaller);
// Step 2: method stubs.
-// Step 3: RegisterNatives.
-
-static const JNINativeMethod kMethodsMyOtherInnerClass[] = {
- { "nativeInit",
-"("
-")"
-"I", reinterpret_cast<void*>(Init) },
};
-static const JNINativeMethod kMethodsTestJni[] = {
- { "nativeInit",
-"("
-")"
-"I", reinterpret_cast<void*>(Init) },
-};
-
-static bool RegisterNativesImpl(JNIEnv* env) {
- g_TestJni_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
- base::android::GetClass(env, kTestJniClassPath).obj()));
-
- const int kMethodsMyOtherInnerClassSize =
- arraysize(kMethodsMyOtherInnerClass);
-
- if (env->RegisterNatives(g_MyOtherInnerClass_clazz,
- kMethodsMyOtherInnerClass,
- kMethodsMyOtherInnerClassSize) < 0) {
- jni_generator::HandleRegistrationError(
- env, g_MyOtherInnerClass_clazz, __FILE__);
- return false;
- }
-
- const int kMethodsTestJniSize = arraysize(kMethodsTestJni);
-
- if (env->RegisterNatives(g_TestJni_clazz,
- kMethodsTestJni,
- kMethodsTestJniSize) < 0) {
- jni_generator::HandleRegistrationError(
- env, g_TestJni_clazz, __FILE__);
- return false;
- }
-
- return true;
-}
+// Step 3: RegisterNatives.
#endif // org_chromium_TestJni_JNI

Powered by Google App Engine
This is Rietveld 408576698