Closed Bug 1182976 Opened 10 years ago Closed 10 years ago

Use nsTHashTable::Iterator in dom/{html,quota,broadcastchannel}/

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

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

References

Details

Attachments

(3 files)

Because iterators are so much nicer than enumerate functions. There are nine occurrences of EnumerateEntries() in dom/{html,quota,broadcastchannel,workers}/ to be dealt with.
Depends on: 1183141
Depends on: 1183158
There should be nothing more in workers after the above two bugs get fixed.
Let's just rename this bug to be about the three non-workers/ cases.
No longer depends on: 1183141, 1183158
Summary: Use nsTHashTable::Iterator in dom/{html,quota,broadcastchannel,workers}/ → Use nsTHashTable::Iterator in dom/{html,quota,broadcastchannel}/
Assignee: nobody → ehsan
Attachment #8634527 - Flags: review?(amarchesini)
Attachment #8634529 - Flags: review?(amarchesini)
Comment on attachment 8634528 [details] [diff] [review] Part 2: Get rid of the Helper class in QuotaManager::OpenDirectoryInternal Review of attachment 8634528 [details] [diff] [review]: ----------------------------------------------------------------- Nice!
Attachment #8634528 - Flags: review?(Jan.Varga) → review+
Comment on attachment 8634527 [details] [diff] [review] Part 1: Get rid of IdentifierMapEntryAddNames Review of attachment 8634527 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/html/nsHTMLDocument.cpp @@ +2322,5 @@ > void > nsHTMLDocument::GetSupportedNames(unsigned, nsTArray<nsString>& aNames) > { > + for (auto iter = mIdentifierMap.Iter(); !iter.Done(); iter.Next()) { > + if (iter.Get()->HasNameElement() || Drive-by comment: I would factor out |nsIdentifierMapEntry* entry = iter.Get();|.
Attachment #8634527 - Flags: review?(amarchesini) → review+
Attachment #8634529 - Flags: review?(amarchesini) → review+
(In reply to Nicholas Nethercote [:njn] from comment #7) > ::: dom/html/nsHTMLDocument.cpp > @@ +2322,5 @@ > > void > > nsHTMLDocument::GetSupportedNames(unsigned, nsTArray<nsString>& aNames) > > { > > + for (auto iter = mIdentifierMap.Iter(); !iter.Done(); iter.Next()) { > > + if (iter.Get()->HasNameElement() || > > Drive-by comment: I would factor out |nsIdentifierMapEntry* entry = > iter.Get();|. Sorry, missed this! Addressed in https://hg.mozilla.org/integration/mozilla-inbound/rev/562a0a1d3dbc.
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: