Closed
Bug 324288
Opened 19 years ago
Closed 7 years ago
Global java object not exposed to JavaScript XPCOM components
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: mozilla, Unassigned)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.51 Build Identifier: I want to instantiate a java object (e.g. new java.math.BigInteger) from an XPCOM JavaScript component. Currently the only way to do this seems to be getting a handle on a window and using window.java. However, it would make for much cleaner interfaces if I could access the "java" object directly. Reproducible: Always Steps to Reproduce: 1. Build an XPCOM component in JavaScript. 2. Try to use the "java" object. Actual Results: It doesn't work, because "java" is not defined. Expected Results: Allowed me to access the global "java" object.
Updated•19 years ago
|
Assignee: jhpedemonte → dbradley
Status: UNCONFIRMED → NEW
Component: Java to XPCOM Bridge → XPConnect
Ever confirmed: true
QA Contact: xpcom-bridge → pschwartau
the code to do this currently lives in nsJSContext::InitializeLiveConnectClasses it could be moved to xpconnect i suppose. anyone happen to know how thread friendly java is? reporter: it'd help if you tested this heavily to try to find out if e.g. initializing java on a different thread has any interesting consequences. i suppose it'd be fairly hard to convince gecko to actually try to create its first jscontext off the main thread, the easiest way would probably be a c++ component that in its NSGetModule function created an osnative thread that then tried to instantiate a jscomponent. you'd have to make sure that no jscomponents registered before that c++ component in that session and that no jscomponents were registered to be created at startup before your c++ component tried to do its dirty work. at one point we tried to actively delay java initialization, but i have a feeling that we gave up at some point, i wonder if this would have startup time implications, i guess the answer is probably not much.
Updated•18 years ago
|
Assignee: dbradley → nobody
Updated•18 years ago
|
QA Contact: pschwartau → xpconnect
Comment 2•7 years ago
|
||
I think the global java object is long gone.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•