diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-09 10:17:35 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-09 10:17:35 +0000 |
commit | f98d7b97c373ad9d65cc102f19acdc43ec3da604 (patch) | |
tree | ca11bd5920735238b4fd4b6e62585e81ec39b020 /base/android/jni_android.cc | |
parent | f2b7e994d1f0b4c12d91e7e93f6e617c318f062e (diff) | |
download | chromium_src-f98d7b97c373ad9d65cc102f19acdc43ec3da604.zip chromium_src-f98d7b97c373ad9d65cc102f19acdc43ec3da604.tar.gz chromium_src-f98d7b97c373ad9d65cc102f19acdc43ec3da604.tar.bz2 |
Refactor ScopedJavaRef
- introduces JavaRef<> base class to allow passing refs without knowledge of their scope
- makes the ScopedJavaLocalRef and ScopedJavaGlobalRef consistent, in name, in methods available, and in conversions allowed.
Also updates some other minor base API changes whilst I'm in those files.
BUG=
TEST=doesn't break build...
Review URL: http://codereview.chromium.org/7828084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/android/jni_android.cc')
-rw-r--r-- | base/android/jni_android.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/android/jni_android.cc b/base/android/jni_android.cc index 9c655ac..1dc02af 100644 --- a/base/android/jni_android.cc +++ b/base/android/jni_android.cc @@ -56,6 +56,16 @@ jmethodID GetMethodID(JNIEnv* env, return id; } +jmethodID GetStaticMethodID(JNIEnv* env, + jclass clazz, + const char* const method, + const char* const jni_signature) { + jmethodID id = env->GetStaticMethodID(clazz, method, jni_signature); + DCHECK(id) << method; + CheckException(env); + return id; +} + bool CheckException(JNIEnv* env) { if (env->ExceptionCheck() == JNI_FALSE) return false; |