Open
Bug 1223177
Opened 9 years ago
Updated 2 years ago
Improve the "QueryInterface needed" assertion message
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox45 | --- | affected |
People
(Reporter: jruderman, Unassigned)
References
Details
(Whiteboard: [necko-priority-review])
Attachments
(1 obsolete file)
In bug 1222202 comment 4, mccr8 wrote:
Also, this assertion should really be fatal, and have a more obvious failure message.
In bug 1222202 comment 6, erahm wrote:
Helpful is relative here. I suppose it just comes down to how much institutional knowledge you have:
1) You have to know what QueryInterface means
2) You have to know that "QueryInterface needed" means "You are missing an interface entry for the interface you are currently trying to use. Go to the concrete implementation's NS_IMPL_ISUPPORTS* macro and add it"
3) As mccr8 mentioned it's non-fatal, so like all non-fatal log output it's generally ignored
As a follow up maybe [we] could make this message more explicit (detailing how to fix the problem rather than stating there is a problem) and make it a fatal assertion. Or we could create a MDN page with some details about what to do when you see this particular assertion.
Reporter | ||
Comment 1•9 years ago
|
||
Could the failure message say which concrete class is missing which interface?
Or could we use a more global (static?) analysis to find classes that inherit from interfaces they don't QI to?
Updated•6 years ago
|
Comment 2•6 years ago
|
||
I use __PRETTY_FUNCTION__ to print out the type T because it seemed
like the simplest way to do that. It does include some extra
information that is not actually needed.
Updated•6 years ago
|
QA Contact: nfroyd
Comment 3•6 years ago
|
||
Nathan pointed out that __PRETTY_FUNCTION__ isn't supported everywhere (not on MSVC), and __func__ doesn't seem to include the template type, so I'll have to come up with another approach. I also want to wait until bug 1455637 is fixed, because changing what the assert looks like will interfere with starring oranges, and kmag already has a fix.
Updated•5 years ago
|
Attachment #9014885 -
Attachment is obsolete: true
Updated•4 years ago
|
Assignee: continuation → nobody
Updated•2 years ago
|
Severity: normal → S3
Updated•2 years ago
|
Whiteboard: [necko-priority-review]
You need to log in
before you can comment on or make changes to this bug.
Description
•