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

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

Issue 115103002: Android: sync up latest JNI generator changes from downstream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds extra params Created 6 years, 11 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/testFromJavaPGenerics.golden
diff --git a/base/android/jni_generator/testFromJavaPGenerics.golden b/base/android/jni_generator/testFromJavaPGenerics.golden
index 6e084fdae7fe8bd8d5627b48962b1c1e22db1c40..1ac340eed10fca3903456b0c656c467365290fce 100644
--- a/base/android/jni_generator/testFromJavaPGenerics.golden
+++ b/base/android/jni_generator/testFromJavaPGenerics.golden
@@ -1,4 +1,4 @@
-// Copyright 2013 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.
@@ -12,18 +12,14 @@
#include <jni.h>
-#include "base/android/jni_android.h"
-#include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
-#include "base/logging.h"
-
-using base::android::ScopedJavaLocalRef;
+#include "base/android/jni_generator/jni_generator_helper.h"
// Step 1: forward declarations.
namespace {
const char kHashSetClassPath[] = "java/util/HashSet";
// Leaking this jclass as we cannot use LazyInstance from some threads.
jclass g_HashSet_clazz = NULL;
+
} // namespace
namespace JNI_HashSet {
@@ -35,7 +31,8 @@ static void Java_HashSet_dummy(JNIEnv* env, jobject obj) __attribute__
((unused));
static void Java_HashSet_dummy(JNIEnv* env, jobject obj) {
/* Must call RegisterNativesImpl() */
- DCHECK(g_HashSet_clazz);
+ CHECK_CLAZZ(env, obj,
+ g_HashSet_clazz);
jmethodID method_id =
base::android::MethodID::LazyGet<
base::android::MethodID::TYPE_INSTANCE>(
@@ -44,20 +41,21 @@ static void Java_HashSet_dummy(JNIEnv* env, jobject obj) {
"()V",
&g_HashSet_dummy);
- env->CallVoidMethod(obj,
- method_id);
- base::android::CheckException(env);
+ env->CallVoidMethod(obj,
+ method_id);
+ jni_generator::CheckException(env);
}
// Step 3: RegisterNatives.
static bool RegisterNativesImpl(JNIEnv* env) {
-
g_HashSet_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
base::android::GetClass(env, kHashSetClassPath).obj()));
+
return true;
}
+
} // namespace JNI_HashSet
#endif // java_util_HashSet_JNI
« no previous file with comments | « base/android/jni_generator/testFromJavaP.golden ('k') | base/android/jni_generator/testInnerClassNatives.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698