Closed
Bug 1186806
Opened 9 years ago
Closed 9 years ago
Replace nsBaseHashtable::EnumerateRead() calls in dom/html/ with iterators
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: poiru)
References
Details
Attachments
(4 files, 1 obsolete file)
1.80 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
2.93 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
2.76 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
1.55 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
Because iterators are so much nicer than enumerate functions. There are five 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 | ||
Comment 1•9 years ago
|
||
Attachment #8638344 -
Flags: review?(khuey)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → birunthan
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8638345 -
Flags: review?(khuey)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8638346 -
Flags: review?(khuey)
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8638347 -
Flags: review?(khuey)
Attachment #8638344 -
Flags: review?(khuey) → review+
Comment on attachment 8638345 [details] [diff] [review] Replace nsBaseHashtable::EnumerateRead() with iterators in HTMLFormElement Review of attachment 8638345 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/html/HTMLFormElement.cpp @@ +141,5 @@ > NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPastNameLookupTable) > + for (auto iter = tmp->mSelectedRadioButtons.Iter(); !iter.Done(); > + iter.Next()) { > + cb.NoteXPCOMChild(ToSupports(iter.UserData())); > + } Can this just use NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSelectedRadioButtons)?
Attachment #8638346 -
Flags: review?(khuey) → review+
Attachment #8638347 -
Flags: review?(khuey) → review+
Comment on attachment 8638345 [details] [diff] [review] Replace nsBaseHashtable::EnumerateRead() with iterators in HTMLFormElement Review of attachment 8638345 [details] [diff] [review]: ----------------------------------------------------------------- Perhaps an r- will elicit a response to my question :D
Attachment #8638345 -
Flags: review?(khuey) → review-
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #5) > Comment on attachment 8638345 [details] [diff] [review] > Replace nsBaseHashtable::EnumerateRead() with iterators in HTMLFormElement > > Review of attachment 8638345 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/html/HTMLFormElement.cpp > @@ +141,5 @@ > > NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPastNameLookupTable) > > + for (auto iter = tmp->mSelectedRadioButtons.Iter(); !iter.Done(); > > + iter.Next()) { > > + cb.NoteXPCOMChild(ToSupports(iter.UserData())); > > + } > > Can this just use NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSelectedRadioButtons)? I assumed the manual traversal was there for a reason, but seems like it's just from ancient times. Sorry for the delay!
Attachment #8638345 -
Attachment is obsolete: true
Attachment #8639445 -
Flags: review?(khuey)
Attachment #8639445 -
Flags: review?(khuey) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/bbc6ff3a0290 https://hg.mozilla.org/integration/mozilla-inbound/rev/60cb17f179ef https://hg.mozilla.org/integration/mozilla-inbound/rev/5608fa9939d2 https://hg.mozilla.org/integration/mozilla-inbound/rev/2696ce503d33
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bbc6ff3a0290 https://hg.mozilla.org/mozilla-central/rev/60cb17f179ef https://hg.mozilla.org/mozilla-central/rev/5608fa9939d2 https://hg.mozilla.org/mozilla-central/rev/2696ce503d33
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•