Closed
Bug 14460
Opened 25 years ago
Closed 23 years ago
XPConnect expects JS method QueryInterface, should use queryInterface
Categories
(Core :: XPConnect, defect, P3)
Core
XPConnect
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: shaver, Assigned: shaver)
References
Details
(Keywords: arch)
...because JS is interCaps (or to match, but we don't vary with declaration in nsISupports.idl).
Comment 1•25 years ago
|
||
This sucks. In C++ we are trying to be compatible with IUnknown and IFactory etc. But for JS even the lowest base interface is going to have incompatible method names. People trying to recycle their JScript COM code will be even more screwed then they would have been. Every flipping COM and xpcom document in the world will be a source of disinformation for JS users. Do we really want to do this?
Comment 2•25 years ago
|
||
I'm confused: C++ will be happy so long as XPIDL converts interCaps to InterCaps, which it does. Also, who could ever hope to recycle JScript COM code without changes? Such compatibility has been a non-goal, and I don't even know that JScript in MS's world can call QueryInterface -- can it? When we get components (.cdl files) flattening interfaces, JS users won't need to QI much, if at all, so this is a low priority bug. But I don't see where the suckage is, given our interCap=>InterCaps C++ from XPIDL binding. /be
Assignee | ||
Comment 3•25 years ago
|
||
JS component implementers will still need to name a method QueryInterface, unlike all their other methods. If our current XPCOM documentation doesn't tell JS users that their method names match IDL case, and that IDL should be interCaps, then we should fix that too.
Comment 4•25 years ago
|
||
This is mostly brainprint pain - for me if no one else :) Except for the brainprint issue, this is no different from our numerous other cases where InterCaps are in the idl... there will be a lot of JS code to be fixed and docs to be updated.
Comment 5•25 years ago
|
||
More to fix the longer we wait -- and the bad meme must not spread further. OK, shaver and I are up for an interCap tree spank when he gets here. Who's agin' us? /be
Comment 6•25 years ago
|
||
I'm in 'whatever' mode. Let's remember that we need to make noise and get help. There are things like docs and junk on branches and personal trees that need to be fixed too. Sorry to repeat the obvious, but this is not like C++ where the compiler will find these mismatches for us.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 7•25 years ago
|
||
shaver and brendan seemed to be voluteering to do this, yet the bug has been languishing on my list. There is a shitload of JS code that contains the string "QueryInterface". There are still other interfaces with InterCaps named methods (e.g. nsISimpleEnumerator::GetNext). If you're going to coordinate a giant renaming then fine. When?
Assignee: jband → shaver
Status: ASSIGNED → NEW
Assignee | ||
Comment 9•24 years ago
|
||
Brendan, can you decide if this should be part of the arch-freeze, and if so make it a dependent of your big arch-bug?
Status: NEW → ASSIGNED
Assignee | ||
Comment 10•24 years ago
|
||
Mozilla 0.9 or not at all. I can whack all the code in the tree, but it's not clear whether xpconnect should be following nsISupports.idl, in which case we also have to remove the hardcoded spelling of QI from xpconnect.
Keywords: mozilla0.9
Comment 11•24 years ago
|
||
If this happens then, sure, nsISupports.idl has to change. I think the only instance of that string in xpconnect that matters is the string literal in xpcjsruntime.cpp. The thing is that if you do this then *all* the JS code that calls QI needs to change. Lots of it is not in the mozilla tree. Worth the pain?
Comment 12•24 years ago
|
||
Yes, and the blame. We will need newsgroup and www.mozilla.org anouncements of this. Anything else? Maybe we should do the documentation stuff first [new blocking bug]?
Comment 13•24 years ago
|
||
I say we spend time on CDL and flattening and not worry about this. I reread my comments from more than a year ago, looked at nsISupports.idl, and can live with the InterCaps for this one magic method, whose usage should go down over time in JS. I think we have bigger fish to fry. I'm not confident we can pull of such a renaming without some "crutch code" that tolerates qI and QI -- which will just prolong the usage of QI. I say WONTFIX, and re-document that interCaps should be used when naming XPIDL attributes and methods (and ALL_CAPS when naming constants). /be
Comment 14•23 years ago
|
||
Why is this still open? Nominating mozilla1.0 because this needs to be resolved one way or another. It's been over a year since Brendan suggested WONTFIX, and we can't leave the possibility of this changing hanging over people's heads.
Keywords: mozilla1.0
Assignee | ||
Comment 15•23 years ago
|
||
Beaten by my own laziness.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → WONTFIX
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•