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

Unified Diff: base/android/jni_generator/jni_generator.py

Issue 10996063: Android: adds Get(Static)MethodIDOrNULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removes spurious ClearException Created 8 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 | « base/android/jni_android.cc ('k') | base/android/jni_generator/jni_generator_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_generator/jni_generator.py
diff --git a/base/android/jni_generator/jni_generator.py b/base/android/jni_generator/jni_generator.py
index de3532f878775779da6a41dec0f74bc07242c7b5..354e33a0f57023560d3a94c0eb9574f5f7172b94 100755
--- a/base/android/jni_generator/jni_generator.py
+++ b/base/android/jni_generator/jni_generator.py
@@ -471,7 +471,7 @@ class JNIFromJavaP(object):
if not match:
continue
self.called_by_natives += [CalledByNative(
- system_class=False,
+ system_class=True,
unchecked=False,
static=False,
java_class_name='',
@@ -923,7 +923,7 @@ jclass g_${JAVA_CLASS}_clazz = NULL;""")
"""Returns the implementation of GetMethodID."""
template = Template("""\
g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME} =
- base::android::Get${STATIC}MethodID(
+ base::android::Get${STATIC}MethodID${SUFFIX}(
env, g_${JAVA_CLASS}_clazz,
"${JNI_NAME}",
${JNI_SIGNATURE});
@@ -938,6 +938,7 @@ jclass g_${JAVA_CLASS}_clazz = NULL;""")
'JNI_NAME': jni_name,
'METHOD_ID_VAR_NAME': called_by_native.method_id_var_name,
'STATIC': 'Static' if called_by_native.static else '',
+ 'SUFFIX': 'OrNull' if called_by_native.system_class else '',
'JNI_SIGNATURE': JniSignature(called_by_native.params,
jni_return_type,
True)
« no previous file with comments | « base/android/jni_android.cc ('k') | base/android/jni_generator/jni_generator_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698