Closed
Bug 11742
Opened 25 years ago
Closed 24 years ago
xpconnect needs instanceof for classes
Categories
(Core :: XPConnect, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla0.9.1
People
(Reporter: cbegle, Assigned: jband_mozilla)
References
Details
so are XPC objects hooked up to work with instanceof?
js> CLASS = Components.classes["nsEcho"]
nsEcho
js> IFACE = Components.interfaces["nsIEcho"]
nsIEcho
// seems like these should be true
js> o = CLASS.createInstance()
[xpconnect wrapped nsISupports]
js> o instanceof CLASS
false
js> o instanceof IFACE
false
// just for curiousity's sake
js> O = o.QueryInterface(IFACE)
[xpconnect wrapped nsIEcho]
js> O instanceof CLASS
false
js> O instanceof IFACE
false
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•25 years ago
|
||
I had already been thinking about this. It is not yet obvious what the best
strategy would be.
Assignee | ||
Comment 2•25 years ago
|
||
instanceof now works for Components.interfaces.*
It will not work for Components.classes.* untill interface flattening is
working. xpconnect does not store info on what CLSID was used to create the
object. Even if it did so it would not work the same with objects that had been
wrapped automatically; i.e. as the result of being passed in as an argument.
When flattening is working and objects support an interface by which they can be
queried for their CLSID then instanceof will be made to work for
Components.classes.* and Components.classesByID.*
Assignee | ||
Updated•24 years ago
|
Depends on: 13422
Summary: inheritance and instanceof with XPC objects → xpconnect needs instanceof for classes
Target Milestone: --- → Future
Assignee | ||
Updated•24 years ago
|
Target Milestone: Future → mozilla0.9.1
Assignee | ||
Comment 4•24 years ago
|
||
fixed by XPCDOM_20010329_BRANCH landing
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•