Closed Bug 14367 Opened 25 years ago Closed 15 years ago

JS (SpiderMonkey) Java interface generation feature request

Categories

(Core :: JavaScript Engine, defect, P3)

All
Windows NT
defect

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: norrisboyd, Unassigned)

Details

Would be cool to have the Rhino interface generation code work with the C engine
in SeaMonkey.

The main class implementing this in Rhino is
JavaAdapter.java.
See
http://lxr.mozilla.org/mozilla/source/js/rhino/org/mozilla/javascript/JavaAdapte
r.java
Status: NEW → ASSIGNED
Target Milestone: M15
Fur, can you be my Obi-Wan here?

/be
I did take a brief look at this.  There's one issue that needs to be addressed
in the C-engine that does not apply to Rhino: What classloader should the
interface-implementing proxy class use ?  (It shouldn't use the system
classloader as that would give it privileges.)

If we want to limit ourselves to JDK 1.3, there's java.lang.reflect.Proxy, a new
class that does 99% of the work for us.  It will generate a class for an
interface and delegate any interface methods to a proxy object, passing in a
Method object and an array of arguments.  See
http://java.sun.com/products/jdk/1.3/docs/api/java/lang/reflect/Proxy.html
Summary: Interface generation feature request → JS (SpiderMonkey) Java interface generation feature request
Setting all Javacript bugs to rginda QA Contact.
QA Contact: cbegle → rginda
George, is this Blackwood stuff that you guys would prefer to have working?
Assignee: brendan → drapeau
Status: ASSIGNED → NEW
Component: Javascript Engine → OJI
QA Contact: rginda → paw
Uhhhh, I dunno.  We'll look at it after Beta 1.
Target Milestone: M15 → M16
Adding beard, who may be uniquely qualified to help here.  Patrick, any thoughts 
on getting this into SpiderMonkey?  See "John Smith"'s (yah right) posting at 
news://news.mozilla.org/8bcqjk%243fc3%40secnews.netscape.com -- but he's not the 
 only one who craves this fix.

/be
I don't think we'd want to limit ourselves to JDK 1.3, as that would leave a lot 
of developers out in the cold (e.g. the Mac, and users of IBM's VMs?). Perhaps we 
should study java.lang.reflect.Proxy, and use it if available. However, our 
JavaAdapter would be very suitable for implementing this, simply using JSObject 
for the delegation, rather than calls into Rhino's ScriptRuntime. I'd be happy to 
own this bug.
Okay, I'm man enough to say it: I don't know enough about the problem, but it 
doesn't seem like an OJI module problem to me, so I'm re-assigning it to the 
Javascript Engine component, and formally asking Patrick if he'll take the bug.

Patrick, will you?
Component: OJI → Javascript Engine
Sure.
Assignee: drapeau → beard
-> M18
Status: NEW → ASSIGNED
Target Milestone: M16 → M18
I think this should be js1.5 (and therefore, JS1.5 won't release till after you 
fix it in M18 timeframe).  Tell me if you disagree, and in any event, what's the 
latest thinking on JS1.5 release date?  There are still a few bugs open, one of 
them mine for M16!

/be
This will have to wait, or land on our post beta3 branch.
Target Milestone: M18 → Future
Updating QA contact -
QA Contact: paw → pschwartau
Assignee: beard → general
Status: ASSIGNED → NEW
-> default qa
QA Contact: pschwartau → general
I don't think we're going to fix this. reopen if you disagree.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.