summaryrefslogtreecommitdiffstats
path: root/remoting/client
diff options
context:
space:
mode:
authortorne <torne@chromium.org>2015-12-03 09:19:49 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-03 17:20:31 +0000
commit7c86f69473845dea973d4e231d93ca602783e9f3 (patch)
tree8945ebf024ef17a824760f4fa083c61687cd61a9 /remoting/client
parentcee4df3805002dd8d648b5ad2db7df2c3e35b4ec (diff)
downloadchromium_src-7c86f69473845dea973d4e231d93ca602783e9f3.zip
chromium_src-7c86f69473845dea973d4e231d93ca602783e9f3.tar.gz
chromium_src-7c86f69473845dea973d4e231d93ca602783e9f3.tar.bz2
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}
Diffstat (limited to 'remoting/client')
-rw-r--r--remoting/client/jni/jni_client.cc2
-rw-r--r--remoting/client/jni/jni_client.h3
2 files changed, 3 insertions, 2 deletions
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<jobject>& 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 <jni.h>
+#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<jobject>& caller);
private:
DISALLOW_COPY_AND_ASSIGN(JniClient);