Closed
Bug 1438615
Opened 6 years ago
Closed 6 years ago
nsIToolkitProfileService.profileCount should return the number of profiles
Categories
(Toolkit :: Startup and Profile System, enhancement)
Toolkit
Startup and Profile System
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: mossop, Assigned: mossop)
Details
Attachments
(1 file)
This bizarre API is just asking for confusion. Let's make it sane.
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8951363 [details] Bug 1438615: profileCount should actually return the number of profiles. https://reviewboard.mozilla.org/r/220620/#review227458 ::: toolkit/profile/nsToolkitProfileService.cpp:960 (Diff revision 1) > NS_IMETHODIMP > nsToolkitProfileService::GetProfileCount(uint32_t *aResult) > { > - if (!mFirst) > - *aResult = 0; > + *aResult = 0; > - else if (! mFirst->mNext) > + nsToolkitProfile* profile = mFirst.get(); Why do you need the .get() calls here? A few lines later there's the same code implemented as simply: for (cur = mFirst; cur != nullptr; cur = cur->mNext) ++pCount;
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8951363 [details] Bug 1438615: profileCount should actually return the number of profiles. https://reviewboard.mozilla.org/r/220620/#review227458 > Why do you need the .get() calls here? > > A few lines later there's the same code implemented as simply: > > for (cur = mFirst; cur != nullptr; cur = cur->mNext) > ++pCount; Can't remember why I did that. Seems to work fine without it. Updated the patch.
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8951363 [details] Bug 1438615: profileCount should actually return the number of profiles. https://reviewboard.mozilla.org/r/220620/#review227574
Attachment #8951363 -
Flags: review?(florian) → review+
Pushed by dtownsend@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c4420500cda8 profileCount should actually return the number of profiles. r=florian
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c4420500cda8
Status: NEW → RESOLVED
Closed: 6 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
•