| Index: base/android/jni_generator/golden_sample_for_tests_jni.h
|
| diff --git a/base/android/jni_generator/golden_sample_for_tests_jni.h b/base/android/jni_generator/golden_sample_for_tests_jni.h
|
| index b90bb9fe310cc39dd5f6a5000e5f122fe64e44e7..4f13d21e0f5a73e2ba7ac316c8bb6e2c7248648a 100644
|
| --- a/base/android/jni_generator/golden_sample_for_tests_jni.h
|
| +++ b/base/android/jni_generator/golden_sample_for_tests_jni.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 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.
|
|
|
| @@ -14,6 +14,8 @@
|
|
|
| #include "base/android/jni_generator/jni_generator_helper.h"
|
|
|
| +#include "base/android/jni_int_wrapper.h"
|
| +
|
| // Step 1: forward declarations.
|
| namespace {
|
| const char kInnerStructAClassPath[] =
|
| @@ -92,8 +94,9 @@ static jstring ReturnAString(JNIEnv* env, jobject jcaller,
|
| }
|
|
|
| static base::subtle::AtomicWord g_SampleForTests_javaMethod = 0;
|
| -static jint Java_SampleForTests_javaMethod(JNIEnv* env, jobject obj, jint foo,
|
| - jint bar) {
|
| +static jint Java_SampleForTests_javaMethod(JNIEnv* env, jobject obj,
|
| + jni_int_wrapper foo,
|
| + jni_int_wrapper bar) {
|
| /* Must call RegisterNativesImpl() */
|
| CHECK_CLAZZ(env, obj,
|
| g_SampleForTests_clazz, 0);
|
| @@ -112,7 +115,7 @@ static jint Java_SampleForTests_javaMethod(JNIEnv* env, jobject obj, jint foo,
|
|
|
| jint ret =
|
| env->CallIntMethod(obj,
|
| - method_id, foo, bar);
|
| + method_id, foo.asJint(), bar.asJint());
|
| jni_generator::CheckException(env);
|
| return ret;
|
| }
|
| @@ -188,7 +191,7 @@ static void Java_SampleForTests_methodThatThrowsException(JNIEnv* env, jobject
|
| static base::subtle::AtomicWord g_InnerStructA_create = 0;
|
| static base::android::ScopedJavaLocalRef<jobject>
|
| Java_InnerStructA_create(JNIEnv* env, jlong l,
|
| - jint i,
|
| + jni_int_wrapper i,
|
| jstring s) {
|
| /* Must call RegisterNativesImpl() */
|
| CHECK_CLAZZ(env, g_InnerStructA_clazz,
|
| @@ -209,7 +212,7 @@ static base::android::ScopedJavaLocalRef<jobject>
|
|
|
| jobject ret =
|
| env->CallStaticObjectMethod(g_InnerStructA_clazz,
|
| - method_id, l, i, s);
|
| + method_id, l, i.asJint(), s);
|
| jni_generator::CheckException(env);
|
| return base::android::ScopedJavaLocalRef<jobject>(env, ret);
|
| }
|
|
|