| Index: base/android/jni_generator/testNativesLong.golden
|
| diff --git a/base/android/jni_generator/testNativesLong.golden b/base/android/jni_generator/testNativesLong.golden
|
| index 24d4a15074cddcece3828a298034d51c3c204c3d..47982cf5e55243a08079fbe5ed7463bc46f87880 100644
|
| --- a/base/android/jni_generator/testNativesLong.golden
|
| +++ b/base/android/jni_generator/testNativesLong.golden
|
| @@ -16,12 +16,11 @@
|
|
|
| // Step 1: forward declarations.
|
| namespace {
|
| -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"{
|
| +
|
| // Step 2: method stubs.
|
| static void Destroy(JNIEnv* env, jobject jcaller,
|
| jlong nativeChromeBrowserProvider) {
|
| @@ -30,32 +29,13 @@ static void Destroy(JNIEnv* env, jobject jcaller,
|
| CHECK_NATIVE_PTR(env, jcaller, native, "Destroy");
|
| return native->Destroy(env, jcaller);
|
| }
|
| +__attribute__((alias("Destroy"), visibility("default")))
|
| + void Java_org_chromium_TestJni_nativeDestroy(JNIEnv* env,
|
| + jobject jcaller,
|
| + jlong nativeChromeBrowserProvider);
|
|
|
| -// Step 3: RegisterNatives.
|
| -
|
| -static const JNINativeMethod kMethodsTestJni[] = {
|
| - { "nativeDestroy",
|
| -"("
|
| -"J"
|
| -")"
|
| -"V", reinterpret_cast<void*>(Destroy) },
|
| };
|
|
|
| -static bool RegisterNativesImpl(JNIEnv* env) {
|
| - g_TestJni_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
|
| - base::android::GetClass(env, kTestJniClassPath).obj()));
|
| -
|
| - 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
|
|
|