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

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

Issue 2204623002: Android: Don't require RegisterNatives if there are none (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/testCalledByNatives.golden
diff --git a/base/android/jni_generator/testCalledByNatives.golden b/base/android/jni_generator/testCalledByNatives.golden
index 82b741807be55f765e04669a42b034f4bfee94c5..ab2b35c5141d7978ff11c083d7cfe217d1439dea 100644
--- a/base/android/jni_generator/testCalledByNatives.golden
+++ b/base/android/jni_generator/testCalledByNatives.golden
@@ -38,7 +38,6 @@ static ScopedJavaLocalRef<jobject> Java_TestJni_showConfirmInfoBar(JNIEnv* env,
jstring buttonCancel,
jstring title,
jobject icon) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -71,7 +70,6 @@ static ScopedJavaLocalRef<jobject> Java_TestJni_showAutoLoginInfoBar(JNIEnv*
jstring realm,
jstring account,
jstring args) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -98,7 +96,6 @@ static ScopedJavaLocalRef<jobject> Java_TestJni_showAutoLoginInfoBar(JNIEnv*
static base::subtle::AtomicWord g_InfoBar_dismiss = 0;
static void Java_InfoBar_dismiss(JNIEnv* env, jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
InfoBar_clazz(env));
jmethodID method_id =
@@ -123,7 +120,6 @@ static jboolean Java_TestJni_shouldShowAutoLogin(JNIEnv* env, jobject view,
jstring realm,
jstring account,
jstring args) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, TestJni_clazz(env),
TestJni_clazz(env), false);
jmethodID method_id =
@@ -151,7 +147,6 @@ static jboolean Java_TestJni_shouldShowAutoLogin(JNIEnv* env, jobject view,
static base::subtle::AtomicWord g_TestJni_openUrl = 0;
static ScopedJavaLocalRef<jobject> Java_TestJni_openUrl(JNIEnv* env, jstring
url) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, TestJni_clazz(env),
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -180,7 +175,6 @@ static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, jobject obj,
JniIntWrapper iType,
JniIntWrapper iPrimaryID,
JniIntWrapper iSecondaryID) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env));
jmethodID method_id =
@@ -209,7 +203,6 @@ static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, jobject obj,
static base::subtle::AtomicWord g_TestJni_uncheckedCall = 0;
static void Java_TestJni_uncheckedCall(JNIEnv* env, jobject obj, JniIntWrapper
iParam) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env));
jmethodID method_id =
@@ -232,7 +225,6 @@ static void Java_TestJni_uncheckedCall(JNIEnv* env, jobject obj, JniIntWrapper
static base::subtle::AtomicWord g_TestJni_returnByteArray = 0;
static ScopedJavaLocalRef<jbyteArray> Java_TestJni_returnByteArray(JNIEnv* env,
jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -256,7 +248,6 @@ static ScopedJavaLocalRef<jbyteArray> Java_TestJni_returnByteArray(JNIEnv* env,
static base::subtle::AtomicWord g_TestJni_returnBooleanArray = 0;
static ScopedJavaLocalRef<jbooleanArray> Java_TestJni_returnBooleanArray(JNIEnv*
env, jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -280,7 +271,6 @@ static ScopedJavaLocalRef<jbooleanArray> Java_TestJni_returnBooleanArray(JNIEnv*
static base::subtle::AtomicWord g_TestJni_returnCharArray = 0;
static ScopedJavaLocalRef<jcharArray> Java_TestJni_returnCharArray(JNIEnv* env,
jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -304,7 +294,6 @@ static ScopedJavaLocalRef<jcharArray> Java_TestJni_returnCharArray(JNIEnv* env,
static base::subtle::AtomicWord g_TestJni_returnShortArray = 0;
static ScopedJavaLocalRef<jshortArray> Java_TestJni_returnShortArray(JNIEnv*
env, jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -328,7 +317,6 @@ static ScopedJavaLocalRef<jshortArray> Java_TestJni_returnShortArray(JNIEnv*
static base::subtle::AtomicWord g_TestJni_returnIntArray = 0;
static ScopedJavaLocalRef<jintArray> Java_TestJni_returnIntArray(JNIEnv* env,
jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -352,7 +340,6 @@ static ScopedJavaLocalRef<jintArray> Java_TestJni_returnIntArray(JNIEnv* env,
static base::subtle::AtomicWord g_TestJni_returnLongArray = 0;
static ScopedJavaLocalRef<jlongArray> Java_TestJni_returnLongArray(JNIEnv* env,
jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -376,7 +363,6 @@ static ScopedJavaLocalRef<jlongArray> Java_TestJni_returnLongArray(JNIEnv* env,
static base::subtle::AtomicWord g_TestJni_returnDoubleArray = 0;
static ScopedJavaLocalRef<jdoubleArray> Java_TestJni_returnDoubleArray(JNIEnv*
env, jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -400,7 +386,6 @@ static ScopedJavaLocalRef<jdoubleArray> Java_TestJni_returnDoubleArray(JNIEnv*
static base::subtle::AtomicWord g_TestJni_returnObjectArray = 0;
static ScopedJavaLocalRef<jobjectArray> Java_TestJni_returnObjectArray(JNIEnv*
env, jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -424,7 +409,6 @@ static ScopedJavaLocalRef<jobjectArray> Java_TestJni_returnObjectArray(JNIEnv*
static base::subtle::AtomicWord g_TestJni_returnArrayOfByteArray = 0;
static ScopedJavaLocalRef<jobjectArray>
Java_TestJni_returnArrayOfByteArray(JNIEnv* env, jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -448,7 +432,6 @@ static ScopedJavaLocalRef<jobjectArray>
static base::subtle::AtomicWord g_TestJni_getCompressFormat = 0;
static ScopedJavaLocalRef<jobject> Java_TestJni_getCompressFormat(JNIEnv* env,
jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -472,7 +455,6 @@ static ScopedJavaLocalRef<jobject> Java_TestJni_getCompressFormat(JNIEnv* env,
static base::subtle::AtomicWord g_TestJni_getCompressFormatList = 0;
static ScopedJavaLocalRef<jobject> Java_TestJni_getCompressFormatList(JNIEnv*
env, jobject obj) {
- /* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
TestJni_clazz(env), NULL);
jmethodID method_id =
@@ -495,6 +477,7 @@ static ScopedJavaLocalRef<jobject> Java_TestJni_getCompressFormatList(JNIEnv*
// Step 3: RegisterNatives.
+static bool RegisterNativesImpl(JNIEnv* env) __attribute__((unused));
static bool RegisterNativesImpl(JNIEnv* env) {
if (base::android::IsManualJniRegistrationDisabled()) return true;

Powered by Google App Engine
This is Rietveld 408576698