Bug 992357 - a. Add array types to jni-generator.py; r=till
authorJim Chen <nchen@mozilla.com>
Fri, 16 May 2014 18:25:28 -0400
changeset 183636 0a33647d1dc0b65bff6eccf8d4c43a36cb8084f6
parent 183635 7dabcbd22f0943f0d40705d644bc2c1577ec7429
child 183637 6c99b5df88090ca860554ed787c1313054736687
push id6844
push userphilringnalda@gmail.com
push dateSun, 18 May 2014 01:12:08 +0000
treeherderfx-team@41a54c8add09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs992357
milestone32.0a1
Bug 992357 - a. Add array types to jni-generator.py; r=till
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 in ('jobject', 'jstring'):
+                elif returnType in ('jobject', 'jstring') or returnType.endswith('Array'):
                     returnValue = 'nullptr'
                 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/'