Last Comment Bug 688628 - js-ctypes access to JNI
: js-ctypes access to JNI
Product: Core
Classification: Components
Component: Widget: Android (show other bugs)
: Trunk
: ARM Android
-- normal (vote)
: mozilla9
Assigned To: Eitan Isaacson [:eeejay]
: Jim Chen [:jchen] [:darchons]
Depends on:
  Show dependency treegraph
Reported: 2011-09-22 15:09 PDT by Eitan Isaacson [:eeejay]
Modified: 2012-09-15 11:04 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Unhide GetJNIForThread (585 bytes, patch)
2011-09-22 15:09 PDT, Eitan Isaacson [:eeejay]
doug.turner: review+
Details | Diff | Splinter Review

Description User image Eitan Isaacson [:eeejay] 2011-09-22 15:09:51 PDT
Created attachment 561899 [details] [diff] [review]
Unhide GetJNIForThread

As an extension author I need access to Android's platform API. The obvious way to do this is through js-ctypes.
Comment 1 User image Martijn Wargers [:mwargers] 2011-09-22 15:23:27 PDT
Hi Eitan, thanks for the patch. If you want to get review on the patch (which I assume you want), you should ask review on someone.
Comment 2 User image Eitan Isaacson [:eeejay] 2011-09-22 15:26:36 PDT
Hey Martijn. I assume you just set that flag right ("review?") for Doug. Right? Or do I need to do anything else? Sorry for the bmo newbyness!
Comment 3 User image Martijn Wargers [:mwargers] 2011-09-22 15:31:28 PDT
Yes, I just set review for Doug. You don't need to do anything anymore.
Comment 4 User image Doug Turner (:dougt) 2011-09-22 15:55:43 PDT
Comment on attachment 561899 [details] [diff] [review]
Unhide GetJNIForThread

this is fine -- but beware, i may change this symbol at anytime without warning. :-D

An alternative is to copy this function (all of it) into your support library.
Comment 5 User image Eitan Isaacson [:eeejay] 2011-09-22 15:57:47 PDT
Support library? wha?? I am hoping not to need one :)

Are we done with the review process? I could push it?
Comment 6 User image Martijn Wargers [:mwargers] 2011-09-22 19:19:27 PDT
Yes, the review process id done. This can be checked in by someone who has check-in privileges (which is not you).
Ideally, you should make a mq patch, which includes your name and check-in comment (which at least should mention the bug nr):
- Add this in your .hgrc:
 username = First Last <email>
 qnew = -U

- To edit the commit message of the patch:
hg qref -e

More info here (you also need to do some other stuff for the mq patch):
Comment 7 User image Ed Morley [:emorley] 2011-09-23 04:44:58 PDT

Thanks for the patch :-)
Comment 8 User image cscott 2012-09-06 12:38:09 PDT
Folks stumbling across this bug via google search for "JNI" and "js-ctypes" might be interested in eeejay's gist which puts most of the pieces together:

I'm working on a patch to to connect a few more dots for those looking to use Android ADK functions from a Firefox Mobile/Android extension.
Comment 9 User image Eitan Isaacson [:eeejay] 2012-09-06 14:40:33 PDT
Here is a more complete module:
Comment 10 User image cscott 2012-09-14 21:35:47 PDT also has a more complete module.

Note You need to log in before you can comment on or make changes to this bug.