Closed
Bug 303522
Opened 19 years ago
Closed 19 years ago
!!! Object's nsIClassInfo lies about it's interfaces!!! classname: HTMLDocument unimplemented interface name: nsIDOMXPathEvaluator
Categories
(Core :: XML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: peterv)
Details
Attachments
(1 file)
|
2.08 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
!!! Object's nsIClassInfo lies about it's interfaces!!! classname: HTMLDocument contractid: <unknown> unimplemented interface name: nsIDOMXPathEvaluator
| Assignee | ||
Comment 2•19 years ago
|
||
Timeless: this is a useless bug report. We need way more details (you might want to read https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html).
background: various dlls randomly refused to load when i was performing this round of testing. the issue is presumably whatever adds support for xpath does it unconditionally for classinfo and conditionally for qi.
so here's a short explanation: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/base/src/nsDocument.cpp&rev=3.564&mark=715-739#692 dynamically /tries/ to add tearoff support for xpath. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/dom/src/base/nsDOMClassInfo.cpp&rev=1.291&mark=1565-1567,1613-1621,1673,1677,1795,1799,2231,2235,2319,2324,2383,2387#1790 statically claims to always support xpath, even though there's code that clearly decides it sometimes doesn't.
| Assignee | ||
Comment 5•19 years ago
|
||
Yes, well, I'm not going to add code that instantiates an object at startup. Checking for the ContractID is good enough, if actually instantiating that component fails then that's too bad.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
| Assignee | ||
Comment 6•19 years ago
|
||
And DEBUG_CheckClassInfoClaims should check for NS_ERROR_NO_INTERFACE imho, any tearoff that fails to instantiate (for example due to out-of-memory) will trigger that printf.
i figure that we should be able to use one of these two info bits:
721 gCheckedForXPathDOM = PR_TRUE;
722 gHaveXPathDOM = (evaluator != nsnull);
1615 PRBool haveXPathDOM;
1616 cr->IsContractIDRegistered(NS_XPATH_EVALUATOR_CONTRACTID,
1617 &haveXPathDOM);
1618 if (haveXPathDOM) {
1619 xpathEvaluatorIID = &NS_GET_IID(nsIDOMXPathEvaluator);i've posted a bug and patch for oom. the whole *point* of the function is to complain about people who declare classinfo and then do something like throw nointerface. note that there's an ASSERT version of this code which means eventually jst will crash with a message telling him to fix either classinfo or queryinterface for this.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
| Assignee | ||
Updated•19 years ago
|
Assignee: general → peterv
Status: REOPENED → ASSIGNED
Attachment #191744 -
Flags: superreview?(jst)
Attachment #191744 -
Flags: review?(jst)
Comment 10•19 years ago
|
||
Comment on attachment 191744 [details] [diff] [review] v1 Sure, r+sr=jst
Attachment #191744 -
Flags: superreview?(jst)
Attachment #191744 -
Flags: superreview+
Attachment #191744 -
Flags: review?(jst)
Attachment #191744 -
Flags: review+
| Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•