Closed
Bug 398889
Opened 17 years ago
Closed 15 years ago
XPCOMUtils.generateQI throws confusing error when interface doesn't exist
Categories
(Core :: XPConnect, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 477735
People
(Reporter: jason.barnabe, Assigned: mnyromyr)
References
Details
Attachments
(1 obsolete file)
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a9pre) Gecko/2007092900 Minefield/3.0a9pre The code XPCOMUtils.generateQI([Components.interfaces.thisDoesntExist, Components.interfaces.nsISupports]) throws JS Component Loader: ERROR file:///home/jason/firefox/dist/bin/modules/XPCOMUtils.jsm:114 TypeError: i has no properties which is fairly confusing. It should throw an error that says the interface doesn't exist.
Assignee | ||
Comment 1•15 years ago
|
||
If the interface doesn't exist or if you just pass null, i.name will throw on its own accord. Safeguarding this, we'll pass null down to the QI and correctly get NS_ERROR_NO_INTERFACE.
Assignee: nobody → mnyromyr
Attachment #374497 -
Flags: review?(sayrer)
Comment 2•15 years ago
|
||
Already fixed in bug 477735. Were you looking at the 1.9.1 branch?
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Updated•15 years ago
|
Attachment #374497 -
Attachment is obsolete: true
Attachment #374497 -
Flags: review?(sayrer)
Assignee | ||
Comment 3•15 years ago
|
||
Basically I think my patch is more elegant than Vlad's... ;-) But it's good to see it's fixed.
Comment 4•15 years ago
|
||
The one he actually landed is functionally equivalent: http://hg.mozilla.org/mozilla-central/rev/0ce096d6b9df
You need to log in
before you can comment on or make changes to this bug.
Description
•