From 7c86f69473845dea973d4e231d93ca602783e9f3 Mon Sep 17 00:00:00 2001 From: torne Date: Thu, 3 Dec 2015 09:19:49 -0800 Subject: jni: Pass method parameters as JavaParamRef in remoting. Pass all object parameters to JNI methods in JavaParamRef<> wrappers. This matches previous changes made to do this for JNI non-method functions. BUG=519562 R=solb@chromium.org Review URL: https://codereview.chromium.org/1472053003 Cr-Commit-Position: refs/heads/master@{#363000} --- remoting/client/jni/jni_client.cc | 2 +- remoting/client/jni/jni_client.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'remoting/client') diff --git a/remoting/client/jni/jni_client.cc b/remoting/client/jni/jni_client.cc index 4af5d86..ce6ba0f 100644 --- a/remoting/client/jni/jni_client.cc +++ b/remoting/client/jni/jni_client.cc @@ -19,7 +19,7 @@ bool JniClient::RegisterJni(JNIEnv* env) { return RegisterNativesImpl(env); } -void JniClient::Destroy(JNIEnv* env, jobject caller) { +void JniClient::Destroy(JNIEnv* env, const JavaParamRef& caller) { delete this; } diff --git a/remoting/client/jni/jni_client.h b/remoting/client/jni/jni_client.h index 56c6bc1..005ec1c 100644 --- a/remoting/client/jni/jni_client.h +++ b/remoting/client/jni/jni_client.h @@ -7,6 +7,7 @@ #include +#include "base/android/scoped_java_ref.h" #include "base/macros.h" namespace remoting { @@ -19,7 +20,7 @@ class JniClient { // Register C++ methods exposed to Java using JNI. static bool RegisterJni(JNIEnv* env); - void Destroy(JNIEnv* env, jobject caller); + void Destroy(JNIEnv* env, const base::android::JavaParamRef& caller); private: DISALLOW_COPY_AND_ASSIGN(JniClient); -- cgit v1.1