Closed
Bug 1463287
Opened 7 years ago
Closed 7 years ago
Add QueryInterface helper macro for concrete class types
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla62
| Tracking | Status | |
|---|---|---|
| firefox62 | --- | fixed |
People
(Reporter: kmag, Assigned: kmag)
References
Details
Attachments
(1 file)
We have a log of QueryInterface methods which implement querying to concrete class types which can't be unambiguously cast to nsISupports, and need to be used with RefPtr/do_QueryObject. Those can't be implemented with existing helper macros, and as a result have several ad-hoc (sometimes slightly dodgy) implementations across the tree.
We should have a helper macro for this, and make sure that the logic that it implements is sane.
| Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8979403 [details]
Bug 1463287: Add QueryInterface helper macro for concrete class types.
https://reviewboard.mozilla.org/r/245568/#review251656
r=me
I guess the various URI classes use hardcoded CID values which are not NS_GET_IID on the relevant class, which is why we can't use the macro for those?
I do think we can use it for nsDocLoader, though.
Attachment #8979403 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Boris Zbarsky [:bz] (no decent commit message means r-) from comment #2)
> I guess the various URI classes use hardcoded CID values which are not
> NS_GET_IID on the relevant class, which is why we can't use the macro for
> those?
Right. Although we should probably fix that.
> I do think we can use it for nsDocLoader, though.
Yeah, that one didn't show up in my greps.
| Assignee | ||
Comment 4•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a1bf5dfd3c00c5e59a59272fb03d0d6684539b82
Bug 1463287: Add QueryInterface helper macro for concrete class types. r=bz
Comment 5•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•