Closed Bug 1186795 Opened 5 years ago Closed 5 years ago

Replace nsBaseHashtable::EnumerateRead() calls in widget/ with iterators

Categories

(Core :: Widget, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: njn, Assigned: njn)

References

Details

Attachments

(3 files)

Because iterators are so much nicer than enumerate functions.

There are two occurrences of EnumerateRead() in this directory.

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

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

::: widget/gtk/nsWindow.cpp
@@ +3433,5 @@
>      if (aEvent->type == GDK_TOUCH_BEGIN || aEvent->type == GDK_TOUCH_UPDATE) {
>          mTouches.Put(aEvent->sequence, touch.forget());
>          // add all touch points to event object
> +        for (auto iter = mTouches.Iter(); !iter.Done(); iter.Next()) {
> +          event.touches.AppendElement(new dom::Touch(*iter.UserData()));

4-space indent
Attachment #8688221 - Flags: review?(roc) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/66d66e4a2b320878f946736eb8e9324a070ca96f
Bug 1186795 (part 1) - Replace nsBaseHashtable::EnumerateRead() calls in widget/ with iterators. r=roc.

https://hg.mozilla.org/integration/mozilla-inbound/rev/4c17fd052cb33808ee28c7819230e15167a937d0
Bug 1186795 (part 2) - Replace nsBaseHashtable::EnumerateRead() calls in widget/ with iterators. r=roc.

https://hg.mozilla.org/integration/mozilla-inbound/rev/42585d719cc7d5c15d063bd01bb38e003d82214a
Bug 1186795 (part 3) - Replace nsBaseHashtable::EnumerateRead() calls in widget/ with iterators. r=roc.
https://hg.mozilla.org/mozilla-central/rev/66d66e4a2b32
https://hg.mozilla.org/mozilla-central/rev/4c17fd052cb3
https://hg.mozilla.org/mozilla-central/rev/42585d719cc7
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.