Closed Bug 1182978 Opened 10 years ago Closed 9 years ago

Use nsTHashTable::Iterator in dom/smil/

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

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

References

Details

Attachments

(5 files)

Because iterators are so much nicer than enumerate functions. There are 14 occurrences of EnumerateEntries() in dom/smil/ to be dealt with.
Assignee: nobody → n.nethercote
Attachment #8637030 - Flags: review?(bbirtles) → review+
Comment on attachment 8637032 [details] [diff] [review] (part 2) - Use nsTHashtable::Iterator in nsSMILAnimationController Review of attachment 8637032 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/smil/nsSMILAnimationController.cpp @@ +377,5 @@ > + for (auto iter = mAnimationElementTable.Iter(); !iter.Done(); iter.Next()) { > + SVGAnimationElement* animElem = iter.Get()->GetKey(); > + if (!animElem) { > + continue; > + } I think we could probably skip the null check here. I notice nsSMILAnimationController::AddStyleUpdate and nsSMILAnimationController::RewindAnimation do that. But leaving this patch as a purely mechanical conversion of the existing code is fine too.
Attachment #8637032 - Flags: review?(bbirtles) → review+
Attachment #8637037 - Flags: review?(bbirtles) → review+
Attachment #8637039 - Flags: review?(bbirtles) → review+
Attachment #8637040 - Flags: review?(bbirtles) → review+
Thank you for the fast reviews. > I think we could probably skip the null check here. Ok. The existing code was *very* conservative about argument checking in some places, so I'm happy to undo that.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: