Closed
Bug 380296
Opened 19 years ago
Closed 4 years ago
Don't cache interface info object for each Java proxy and XPCOM stub
Categories
(Core Graveyard :: Java to XPCOM Bridge, defect)
Core Graveyard
Java to XPCOM Bridge
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jhpedemonte, Unassigned)
References
Details
Attachments
(1 file)
|
141.12 KB,
patch
|
Details | Diff | Splinter Review |
Currently, the JavaXPCOM code caches the interface info object for each Java proxy and XPCOM stub. This is unnecessary, though, since xptiInterfaceInfoManager (impl of nsIInterfaceInfoManager) keeps the info objects in a hash table. So it should be enough to call |GetInfoForIID()| or |GetInfoForName()| as necessary.
| Reporter | ||
Comment 1•19 years ago
|
||
Well, I was mistaken as to what JavaXPCOM was actually doing with the nsIInterfaceInfo objects. I thought I had written something elaborate, but XPCOMJavaProxy and nsJavaXPCOMStub are just keeping around pointers. Still, I didn't like the use of JavaXPCOMInstance object in XPCOMJavaProxy. So I made a few changes, refactored and cleaned up the code.
Functional changes in this patch:
* Use cached nsIInterfaceInfoManager, rather than calling do_GetService every time.
* Take XPConnect's code that uses nsIInterfaceInfoSuperManager to look at different managers, if they exist.
* In XPCOMJavaProxy, no need to save the nsIInterfaceInfo pointer, since we know the interface by name and can call GetInfoForName.
* In XPCOMJavaProxy, for methods callXPCOMMethod and finalizeProxy, pass native handle and interface name to native method, rather than forcing native method to call back into Java to retrieve them.
The rest is just refactoring and cleanup. But getting rid of JavaXPCOMInstance will make it easier to use the native object handle directly in Java (i.e. bug 343580).
| Assignee | ||
Updated•12 years ago
|
Product: Core → Core Graveyard
Comment 2•4 years ago
|
||
JavaXPCOM was removed in bug 648593.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•