JS (SpiderMonkey) Java interface generation feature request

RESOLVED WONTFIX

Status

()

Core
JavaScript Engine
P3
normal
RESOLVED WONTFIX
18 years ago
8 years ago

People

(Reporter: Norris Boyd, Unassigned)

Tracking

Trunk
Future
All
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
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

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: M15

Comment 1

18 years ago
Fur, can you be my Obi-Wan here?

/be

Comment 2

18 years ago
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

Updated

18 years ago
Summary: Interface generation feature request → JS (SpiderMonkey) Java interface generation feature request

Comment 3

18 years ago
Setting all Javacript bugs to rginda QA Contact.
QA Contact: cbegle → rginda

Comment 4

18 years ago
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

Comment 5

18 years ago
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

Comment 7

18 years ago
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.

Comment 8

18 years ago
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

Comment 9

18 years ago
Sure.
Assignee: drapeau → beard

Comment 10

18 years ago
-> 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

Comment 12

18 years ago
This will have to wait, or land on our post beta3 branch.
Target Milestone: M18 → Future

Comment 13

17 years ago
Updating QA contact -
QA Contact: paw → pschwartau

Updated

13 years ago
Assignee: beard → general
Status: ASSIGNED → NEW

Comment 14

12 years ago
-> default qa
QA Contact: pschwartau → general

Comment 15

8 years ago
I don't think we're going to fix this. reopen if you disagree.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.