Closed
Bug 1475461
Opened 6 years ago
Closed 6 years ago
Make PLDHashTable::Search() const
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(2 files)
PLDHashTable::Search() is now not marked as const. Therefore, if its caller is marked as const, it needs to use const_cast. So, let's mark the method (and related methods) as const.
Assignee | ||
Comment 1•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ecd2615dcd73b5721bea37355a0227f459b495ff
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8991871 [details] Bug 1475461 - part 1: Mark PLDHashTable::Search() and called by it as const https://reviewboard.mozilla.org/r/256794/#review263740 Wow, this ended up being a lot more invasive than I was hoping for... Thanks very much for doing this! :-)
Attachment #8991871 -
Flags: review?(ehsan) → review+
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8991872 [details] Bug 1475461 - part 2: Make callers of PLDHashTable::Search() const methods if possible https://reviewboard.mozilla.org/r/256796/#review263742 Very nice! ::: dom/commandhandler/nsCommandParams.cpp:298 (Diff revision 1) > } > > nsCommandParams::HashEntry* > nsCommandParams::GetNamedEntry(const char* aName) const > { > - return static_cast<HashEntry*>( > + return static_cast<HashEntry*>(mValuesHash.Search((void*)aName)); Hmm, it'd be nice if the argument type were const void*...
Attachment #8991872 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 6•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8991872 [details] Bug 1475461 - part 2: Make callers of PLDHashTable::Search() const methods if possible https://reviewboard.mozilla.org/r/256796/#review263742 > Hmm, it'd be nice if the argument type were const void*... Do you think that I should change it here? (You commented this as an open issue...)
Comment 8•6 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (JST, +0900) from comment #6) > Comment on attachment 8991872 [details] > Bug 1475461 - part 2: Make callers of PLDHashTable::Search() const methods > if possible > > https://reviewboard.mozilla.org/r/256796/#review263742 > > > Hmm, it'd be nice if the argument type were const void*... > > Do you think that I should change it here? (You commented this as an open > issue...) Ah no, I was thinking out loud, I don't want to make you do more work here than you already did! Thanks. :-) (Sorry, I keep forgetting that these comments open issues in MozReview, need to get better at noticing that...)
Flags: needinfo?(ehsan)
Assignee | ||
Comment 9•6 years ago
|
||
No, problem, thank you for your review!
Comment 10•6 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/9f8a3c2f6528 part 1: Mark PLDHashTable::Search() and called by it as const r=Ehsan https://hg.mozilla.org/integration/autoland/rev/de078de9ee98 part 2: Make callers of PLDHashTable::Search() const methods if possible r=Ehsan
Comment 11•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9f8a3c2f6528 https://hg.mozilla.org/mozilla-central/rev/de078de9ee98
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•