Bug 783921 - Follow up to fix jni function names. r=mfinkle a=akeybl
authorWes Johnston <wjohnston@mozilla.com>
Thu, 13 Sep 2012 14:16:14 -0700
changeset 109790 1f82974dc08c381e63b73db36b045c5ef5e6cdf2
parent 109789 974494c2de324139b23603303e2b23cc53dfd516
child 109791 25a31e8d9ae8d9cc802469bacb3eca580968a690
push id214
push userakeybl@mozilla.com
push dateWed, 14 Nov 2012 20:38:59 +0000
treeherdermozilla-release@c8b08ec8e1aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, akeybl
bugs783921
milestone17.0a2
Bug 783921 - Follow up to fix jni function names. r=mfinkle a=akeybl
mobile/android/chrome/content/browser.js
mobile/android/modules/JNI.jsm
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -6328,17 +6328,17 @@ var WebappsUI = {
 
   get iconSize() {
     let iconSize = 64;
     try {
       Cu.import("resource://gre/modules/JNI.jsm");
       let jni = new JNI();
       let cls = jni.findClass("org.mozilla.gecko.GeckoAppShell");
       let method = jni.getStaticMethodID(cls, "getPreferredIconSize", "()I");
-      iconSize = jni.callStaticIntMethod(cls, method, null);
+      iconSize = jni.callStaticIntMethod(cls, method);
       jni.close();
     } catch(ex) {
       console.log(ex);
     }
 
     delete this.iconSize;
     return this.iconSize = iconSize;
   },
--- a/mobile/android/modules/JNI.jsm
+++ b/mobile/android/modules/JNI.jsm
@@ -62,77 +62,77 @@ JNI.prototype = {
     jobject: ctypes.StructType("_jobject").ptr,
     jclass: ctypes.StructType("_jobject").ptr,
     jmethodID: ctypes.StructType("jmethodID").ptr,
     jvalue: ctypes.double
   },
 
   get _findClass() {
     delete this._findClass;
-    return this._findClass = this.lib.declare("FindClass",
+    return this._findClass = this.lib.declare("jsjni_FindClass",
                                               ctypes.default_abi,
                                               this.types.jclass,
                                               ctypes.char.ptr);
   },
 
   findClass: function(name) {
     let ret = this._findClass(name);
     if (this.exceptionCheck())
        throw("Can't find class " + name);
     return ret;
   },
 
   get _getStaticMethodID() {
     delete this._getStatisMethodID;
-    return this._getStaticMethodID = this.lib.declare("GetStaticMethodID",
+    return this._getStaticMethodID = this.lib.declare("jsjni_GetStaticMethodID",
                                                       ctypes.default_abi,
                                                       this.types.jmethodID,
                                                       this.types.jclass, // class
                                                       ctypes.char.ptr,   // method name
                                                       ctypes.char.ptr);  // signature
   },
 
   getStaticMethodID: function(aClass, aName, aSignature) {
     let ret = this._getStaticMethodID(aClass, aName, aSignature);
     if (this.exceptionCheck())
        throw("Can't find method " + aName);
     return new jMethod(aName, ret, aSignature);
   },
 
   get _exceptionCheck() {
     delete this._exceptionCheck;
-    return this._exceptionCheck = this.lib.declare("ExceptionCheck",
+    return this._exceptionCheck = this.lib.declare("jsjni_ExceptionCheck",
                                                    ctypes.default_abi,
                                                    ctypes.bool);
   },
 
   exceptionCheck: function() {
     return this._exceptionCheck();
   },
 
   get _callStaticVoidMethod() {
     delete this._callStaticVoidMethod;
-    return this._callStaticVoidMethod = this.lib.declare("CallStaticVoidMethodA",
+    return this._callStaticVoidMethod = this.lib.declare("jsjni_CallStaticVoidMethodA",
                                                    ctypes.default_abi,
                                                    ctypes.void_t,
                                                    this.types.jclass,
                                                    this.types.jmethodID,
                                                    this.types.jvalue.ptr);
   },
 
   callStaticVoidMethod: function(aClass, aMethod) {
     let args = Array.prototype.slice.apply(arguments, [2]);
     this._callStaticVoidMethod(aClass, aMethodId.methodId, this.getArgs(aMethod, args));
     if (this.exceptionCheck())
        throw("Error calling static void method");
   },
 
   get _callStaticIntMethod() {
     delete this._callStaticIntMethod;
-    return this._callStaticIntMethod = this.lib.declare("CallStaticIntMethodA",
+    return this._callStaticIntMethod = this.lib.declare("jsjni_CallStaticIntMethodA",
                                                    ctypes.default_abi,
                                                    ctypes.int,
                                                    this.types.jclass,
                                                    this.types.jmethodID,
                                                    this.types.jvalue.ptr);
   },
 
   callStaticIntMethod: function(aClass, aMethod) {