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

Unified Diff: trunk/src/base/android/jni_generator/testFromJavaP.golden

Issue 492713002: Revert 290810 "Make class lookup lazy in jni_generator when usin..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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: trunk/src/base/android/jni_generator/testFromJavaP.golden
===================================================================
--- trunk/src/base/android/jni_generator/testFromJavaP.golden (revision 290812)
+++ trunk/src/base/android/jni_generator/testFromJavaP.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 kInputStreamClassPath[] = "java/io/InputStream";
-#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_InputStream_clazz = NULL;
-jclass InputStream_clazz(JNIEnv*) { return g_InputStream_clazz; }
-#if __clang__
-#pragma clang diagnostic pop
-#endif
} // namespace
@@ -42,11 +34,11 @@
static jint Java_InputStream_available(JNIEnv* env, jobject obj) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
- InputStream_clazz(env), 0);
+ g_InputStream_clazz, 0);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"available",
"()I",
&g_InputStream_available);
@@ -64,11 +56,11 @@
static void Java_InputStream_close(JNIEnv* env, jobject obj) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
- InputStream_clazz(env));
+ g_InputStream_clazz);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"close",
"()V",
&g_InputStream_close);
@@ -85,11 +77,11 @@
static void Java_InputStream_mark(JNIEnv* env, jobject obj, JniIntWrapper p0) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
- InputStream_clazz(env));
+ g_InputStream_clazz);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"mark",
"(I)V",
&g_InputStream_mark);
@@ -106,11 +98,11 @@
static jboolean Java_InputStream_markSupported(JNIEnv* env, jobject obj) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
- InputStream_clazz(env), false);
+ g_InputStream_clazz, false);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"markSupported",
"()Z",
&g_InputStream_markSupported);
@@ -128,11 +120,11 @@
static jint Java_InputStream_readI(JNIEnv* env, jobject obj) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
- InputStream_clazz(env), 0);
+ g_InputStream_clazz, 0);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"read",
"()I",
&g_InputStream_readI);
@@ -150,11 +142,11 @@
static jint Java_InputStream_readI_AB(JNIEnv* env, jobject obj, jbyteArray p0) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
- InputStream_clazz(env), 0);
+ g_InputStream_clazz, 0);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"read",
"([B)I",
&g_InputStream_readI_AB);
@@ -177,11 +169,11 @@
JniIntWrapper p2) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
- InputStream_clazz(env), 0);
+ g_InputStream_clazz, 0);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"read",
"([BII)I",
&g_InputStream_readI_AB_I_I);
@@ -199,11 +191,11 @@
static void Java_InputStream_reset(JNIEnv* env, jobject obj) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
- InputStream_clazz(env));
+ g_InputStream_clazz);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"reset",
"()V",
&g_InputStream_reset);
@@ -220,11 +212,11 @@
static jlong Java_InputStream_skip(JNIEnv* env, jobject obj, jlong p0) {
/* Must call RegisterNativesImpl() */
CHECK_CLAZZ(env, obj,
- InputStream_clazz(env), 0);
+ g_InputStream_clazz, 0);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"skip",
"(J)J",
&g_InputStream_skip);
@@ -242,18 +234,18 @@
static base::android::ScopedJavaLocalRef<jobject>
Java_InputStream_Constructor(JNIEnv* env) {
/* Must call RegisterNativesImpl() */
- CHECK_CLAZZ(env, InputStream_clazz(env),
- InputStream_clazz(env), NULL);
+ CHECK_CLAZZ(env, g_InputStream_clazz,
+ g_InputStream_clazz, NULL);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
- env, InputStream_clazz(env),
+ env, g_InputStream_clazz,
"<init>",
"()V",
&g_InputStream_Constructor);
jobject ret =
- env->NewObject(InputStream_clazz(env),
+ env->NewObject(g_InputStream_clazz,
method_id);
jni_generator::CheckException(env);
return base::android::ScopedJavaLocalRef<jobject>(env, ret);

Powered by Google App Engine
This is Rietveld 408576698