| Index: base/android/jni_generator/testNatives.golden
|
| diff --git a/base/android/jni_generator/testNatives.golden b/base/android/jni_generator/testNatives.golden
|
| index db69a5aaa6d9df6701351bc3812c57bda71d58ce..e016aa1ef9779c1643d89ea0d5d12da65198338f 100644
|
| --- a/base/android/jni_generator/testNatives.golden
|
| +++ b/base/android/jni_generator/testNatives.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 kTestJniClassPath[] = "org/chromium/TestJni";
|
| +#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
|
|
|
| @@ -202,11 +210,11 @@ static bool RegisterNativesImpl(JNIEnv* env) {
|
|
|
| const int kMethodsTestJniSize = arraysize(kMethodsTestJni);
|
|
|
| - if (env->RegisterNatives(g_TestJni_clazz,
|
| + if (env->RegisterNatives(TestJni_clazz(env),
|
| kMethodsTestJni,
|
| kMethodsTestJniSize) < 0) {
|
| jni_generator::HandleRegistrationError(
|
| - env, g_TestJni_clazz, __FILE__);
|
| + env, TestJni_clazz(env), __FILE__);
|
| return false;
|
| }
|
|
|
|
|