Closed
Bug 1182960
Opened 10 years ago
Closed 10 years ago
Use nsTHashTable::Iterator in toolkit/
Categories
(Toolkit :: General, defect)
Toolkit
General
Tracking
()
RESOLVED
FIXED
mozilla42
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(2 files)
|
6.05 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
|
8.68 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
Because iterators are so much nicer than enumerate functions.
There are ten occurrences of EnumerateEntries() in toolkit/ to be dealt with.
| Assignee | ||
Comment 1•10 years ago
|
||
> There are ten occurrences of EnumerateEntries() in toolkit/ to be dealt with.
Correction: there are only eight occurrences. There are two false positive matches when you grep for EnumerateEntries() because there's a local function with that name which, ironically enough, is passed as an argument to an nsBaseHashtable::Enumerate() call.
| Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8633476 -
Flags: review?(dao)
| Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8633477 -
Flags: review?(dao)
Updated•10 years ago
|
Attachment #8633477 -
Flags: review?(dao) → review?(mak77)
Updated•10 years ago
|
Attachment #8633476 -
Flags: review?(dao) → review?(mak77)
Comment 4•10 years ago
|
||
Comment on attachment 8633477 [details] [diff] [review]
(part 2) - Use nsTHashtable::Iterator in toolkit/components/places/
Review of attachment 8633477 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/places/nsFaviconService.cpp
@@ +157,5 @@
> }
>
> PRTime now = PR_Now();
> + for (auto iter = mUnassociatedIcons.Iter(); !iter.Done(); iter.Next()) {
> + if (now - iter.Get()->created >= UNASSOCIATED_ICON_EXPIRY_INTERVAL) {
please factor out iter.Get() for readability and showing an explicit type
Attachment #8633477 -
Flags: review?(mak77) → review+
Comment 5•10 years ago
|
||
Comment on attachment 8633476 [details] [diff] [review]
(part 1) - Use nsTHashtable::Iterator in toolkit/components/telemetry/
Review of attachment 8633476 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
Attachment #8633476 -
Flags: review?(mak77) → review+
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/774c08a56c10
https://hg.mozilla.org/mozilla-central/rev/a32e92330e99
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•