Bug 863777 - Add types to jni-generator.py; r=kats
authorJim Chen <nchen@mozilla.com>
Fri, 14 Jun 2013 12:42:10 -0400
changeset 146579 d3a99408f071ddfb37e0ee0656e2dbb0cfe521a7
parent 146578 4ee84aacb4de671d90875747de715b84f6ef9f85
child 146580 6ef6c1d22b82c422a52d09b42b0e769b057bbeb2
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs863777
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 863777 - Add types to jni-generator.py; r=kats
mobile/android/base/jni-generator.py
--- a/mobile/android/base/jni-generator.py
+++ b/mobile/android/base/jni-generator.py
@@ -62,17 +62,17 @@ class Generator:
                 functionName = match.group('functionName')
 
             match = re.match(paramsRegex, line)
             if match:
                 paramTypes = re.split('\s*,\s*', match.group(1))
                 paramNames = ['arg%d' % i for i in range(0, len(paramTypes))]
                 if returnType == 'void':
                     returnValue = ''
-                elif returnType == 'jobject':
+                elif returnType in ('jobject', 'jstring'):
                     returnValue = 'NULL'
                 elif returnType in ('jint', 'jfloat', 'jdouble', 'jlong'):
                     returnValue = '0'
                 elif returnType == 'jboolean':
                     returnValue = 'false'
                 else:
                     raise Exception(('Unsupported JNI return type %s found; '
                                      + 'please update mobile/android/base/'