Bug 799015 - Use correct syntax for findClass() in JNI. r=wesj
authorBrian Nicholson <bnicholson@mozilla.com>
Mon, 08 Oct 2012 10:23:27 -0700
changeset 109693 3c12b65a382d896a16432eb2d45e3304cc890de9
parent 109692 bd5d8c09fe63bda00b2c774e2fd2d667b53b8d7e
child 109694 107c60f2d45abbf9d5046d822c00e3e4ef5dfc8c
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerswesj
bugs799015
milestone18.0a1
Bug 799015 - Use correct syntax for findClass() in JNI. r=wesj
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
@@ -6639,17 +6639,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 cls = jni.findClass("org/mozilla/gecko/GeckoAppShell");
       let method = jni.getStaticMethodID(cls, "getPreferredIconSize", "()I");
       iconSize = jni.callStaticIntMethod(cls, method);
       jni.close();
     } catch(ex) {
       console.log(ex);
     }
 
     delete this.iconSize;
--- a/mobile/android/modules/JNI.jsm
+++ b/mobile/android/modules/JNI.jsm
@@ -1,13 +1,13 @@
 /* Very basic JNI support for JS
  *
  * Example Usage:
  *   let jni = new JNI();
- *   cls = jni.findClass("org.mozilla.gecko.GeckoAppShell");
+ *   cls = jni.findClass("org/mozilla/gecko/GeckoAppShell");
  *   method = jni.getStaticMethodID(cls, "getPreferredIconSize", "(I)I");
  *
  *   let val = jni.callStaticIntMethod(cls, method, 3);
  *   // close the jni library when you are done
  *   jni.close();
  */
 let EXPORTED_SYMBOLS = ["JNI"];