Closed
Bug 1437606
Opened 8 years ago
Closed 8 years ago
tidy up QI implementations in libpref
Categories
(Core :: Preferences: Backend, enhancement)
Core
Preferences: Backend
Tracking
()
RESOLVED
FIXED
mozilla60
| Tracking | Status | |
|---|---|---|
| firefox60 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(2 files)
|
3.32 KB,
patch
|
n.nethercote
:
review+
|
Details | Diff | Splinter Review |
|
2.84 KB,
patch
|
n.nethercote
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•8 years ago
|
||
This construct is nicer than NS_INTERFACE_MAP_BEGIN and assures the
reader there's no weirdness in the QI implementation. This change does
mean that PGO doesn't get an opportunity to measure the frequency of
which interfaces are QI'd most often. I think this is probably an OK
tradeoff to make, given the prevalence of NS_IMPL_QUERY_INTERFACE
elsewhere in the codebase.
The one thing we have to ensure with this change is that the ambiguous
QI to nsISupports uses the proper class after the change. The
NS_IMPL_QUERY_INTERFACE macro chooses the first interface listed to
disambiguate the cast to nsISupports.
Attachment #8950292 -
Flags: review?(n.nethercote)
| Assignee | ||
Comment 2•8 years ago
|
||
Now that we've used the standard NS_IMPL_QUERY_INTERFACE macro, we can
start using the even more standard NS_IMPL_ISUPPORTS macro.
Attachment #8950293 -
Flags: review?(n.nethercote)
Updated•8 years ago
|
Attachment #8950292 -
Flags: review?(n.nethercote) → review+
Comment 3•8 years ago
|
||
Comment on attachment 8950293 [details] [diff] [review]
part 2 - use NS_IMPL_ISUPPORTS in modules/libpref/
Review of attachment 8950293 [details] [diff] [review]:
-----------------------------------------------------------------
This is one case where I think folding the two patches together would make them easier to understand :)
Attachment #8950293 -
Flags: review?(n.nethercote) → review+
| Assignee | ||
Comment 4•8 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #3)
> This is one case where I think folding the two patches together would make
> them easier to understand :)
Maybe so. For the xpconnect version (bug 1437605), it seemed easier to split them up, because it was easier to verify that the ambiguous nsISupports cast was in the right place. But I guess here, that was less of a concern.
Comment 5•8 years ago
|
||
It's not a big deal either way.
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/98c4ffa07c96
part 1 - use NS_IMPL_QUERY_INTERFACE in modules/libpref/; r=njn
https://hg.mozilla.org/integration/mozilla-inbound/rev/0541e57dfa18
part 2 - use NS_IMPL_ISUPPORTS in modules/libpref/; r=njn
Comment 7•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/98c4ffa07c96
https://hg.mozilla.org/mozilla-central/rev/0541e57dfa18
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in
before you can comment on or make changes to this bug.
Description
•