Closed Bug 1187142 Opened 9 years ago Closed 9 years ago

Replace nsBaseHashtable::Enumerate() calls in hal/ with iterators

Categories

(Core :: Hardware Abstraction Layer (HAL), defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

Because iterators are so much nicer than enumerate functions.

There is one occurrence of Enumerate() in this directory.

A note to the assignee: to preserve existing behaviour, you should probably use
nsBaseHashtable::Iterator::Data() rather than nsBaseHashtable::Iterator::UserData(). (The latter should be used when replacing nsBaseHashtable::EnumerateRead()).
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Comment on attachment 8676021 [details] [diff] [review]
Replace nsBaseHashtable::Enumerate() calls in hal/ with iterators

Review of attachment 8676021 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm

::: hal/HalWakeLock.cpp
@@ +133,5 @@
> +          NotifyWakeLockChange(WakeLockInfoFromLockCount(iter.Key(),
> +                                                         totalCount));
> +        }
> +
> +        if (totalCount.numLocks == 0) {

Yes! Much easier to read that !totalCount.numLocks
Attachment #8676021 - Flags: review?(dhylands) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/7f2acbbadd117438960fa1176ef5c067571372a3
Bug 1187142 - Replace nsBaseHashtable::Enumerate() calls in hal/ with iterators. r=dhylands.
https://hg.mozilla.org/mozilla-central/rev/7f2acbbadd11
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: