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

Unified Diff: base/android/jni_generator/sample_for_tests.cc

Issue 2418893003: Use JavaRef in JNI generator sample. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_generator/sample_for_tests.cc
diff --git a/base/android/jni_generator/sample_for_tests.cc b/base/android/jni_generator/sample_for_tests.cc
index 157b7cd86af881ede7742671f7d023bfaf4c4a70..42b2143e9898fb22a0454e07c00a48e5179d11c7 100644
--- a/base/android/jni_generator/sample_for_tests.cc
+++ b/base/android/jni_generator/sample_for_tests.cc
@@ -117,7 +117,7 @@ int main() {
// This is how you call a java method from C++. Note that you must have
// obtained the jobject somehow.
- jobject my_java_object = NULL;
+ ScopedJavaLocalRef<jobject> my_java_object;
int bar = base::android::Java_SampleForTests_javaMethod(
env, my_java_object, 1, 2);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698