| Index: trunk/src/base/android/jni_generator/testEagerCalledByNativesOption.golden
|
| ===================================================================
|
| --- trunk/src/base/android/jni_generator/testEagerCalledByNativesOption.golden (revision 290812)
|
| +++ trunk/src/base/android/jni_generator/testEagerCalledByNativesOption.golden (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 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,16 +19,8 @@
|
| // 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
|
| jmethodID g_Test_testMethodWithParam = NULL;
|
| jmethodID g_Test_testStaticMethodWithParam = NULL;
|
| jmethodID g_Test_testMethodWithNoParam = NULL;
|
| @@ -54,21 +46,20 @@
|
| }
|
|
|
| static jint testStaticMethodWithParam(JNIEnv* env, JniIntWrapper iParam) {
|
| - jint ret = env->CallStaticIntMethod(Test_clazz(env),
|
| + jint ret = env->CallStaticIntMethod(g_Test_clazz,
|
| g_Test_testStaticMethodWithParam, as_jint(iParam));
|
| return ret;
|
| }
|
|
|
| static jdouble testMethodWithNoParam(JNIEnv* env) {
|
| - jdouble ret = env->CallStaticDoubleMethod(Test_clazz(env),
|
| + jdouble ret = env->CallStaticDoubleMethod(g_Test_clazz,
|
| g_Test_testMethodWithNoParam);
|
| return ret;
|
| }
|
|
|
| static base::android::ScopedJavaLocalRef<jstring>
|
| testStaticMethodWithNoParam(JNIEnv* env) {
|
| - jstring ret =
|
| - static_cast<jstring>(env->CallStaticObjectMethod(Test_clazz(env),
|
| + jstring ret = static_cast<jstring>(env->CallStaticObjectMethod(g_Test_clazz,
|
| g_Test_testStaticMethodWithNoParam));
|
| return base::android::ScopedJavaLocalRef<jstring>(env, ret);
|
| }
|
| @@ -90,16 +81,16 @@
|
|
|
| const int kMethodsTestSize = arraysize(kMethodsTest);
|
|
|
| - if (env->RegisterNatives(Test_clazz(env),
|
| + if (env->RegisterNatives(g_Test_clazz,
|
| kMethodsTest,
|
| kMethodsTestSize) < 0) {
|
| jni_generator::HandleRegistrationError(
|
| - env, Test_clazz(env), __FILE__);
|
| + env, g_Test_clazz, __FILE__);
|
| return false;
|
| }
|
|
|
| g_Test_testMethodWithParam = env->GetMethodID(
|
| - Test_clazz(env),
|
| + g_Test_clazz,
|
| "testMethodWithParam",
|
| "("
|
| "I"
|
| @@ -110,7 +101,7 @@
|
| }
|
|
|
| g_Test_testStaticMethodWithParam = env->GetStaticMethodID(
|
| - Test_clazz(env),
|
| + g_Test_clazz,
|
| "testStaticMethodWithParam",
|
| "("
|
| "I"
|
| @@ -121,7 +112,7 @@
|
| }
|
|
|
| g_Test_testMethodWithNoParam = env->GetStaticMethodID(
|
| - Test_clazz(env),
|
| + g_Test_clazz,
|
| "testMethodWithNoParam",
|
| "("
|
| ")"
|
| @@ -131,7 +122,7 @@
|
| }
|
|
|
| g_Test_testStaticMethodWithNoParam = env->GetStaticMethodID(
|
| - Test_clazz(env),
|
| + g_Test_clazz,
|
| "testStaticMethodWithNoParam",
|
| "("
|
| ")"
|
|
|