It might be worth to mention the PLDHashTable::Iterator in the hashtable
guides.

https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Guide/Hashtables
https://developer.mozilla.org/en-US/docs/Detailed_XPCOM_hashtable_guide

TYLin

On Mon, Jul 13, 2015 at 1:36 PM, Nicholas Nethercote <n.netherc...@gmail.com
> wrote:

> Hi,
>
> Last week I landed patches that remove PL_DHashTableEnumerate() from
> the tree (https://bugzilla.mozilla.org/show_bug.cgi?id=1180072). You
> should now use PLDHashTable::Iterator if you want to iterate over a
> PLDHashTable. The iterator is *so* much nicer -- there's none of that
> "bundle up an environment as a |void*| pointer and pass it in with a
> function pointer" annoyance.
>
> I have also added Iterator classes to each of nsTHashtable and
> nsBaseHashtable (https://bugzilla.mozilla.org/show_bug.cgi?id=1181445)
> and I would like to also eventually remove the enumerate functions
> from these classes. However, there are 500+ calls to those enumerate
> functions so it's going to take a while.
>
> For now, I've filed bugs to get rid of all the
> nsTHashtable::EnumerateEntries() calls, which account for ~160 of
> those 500+. They're all blocking
> https://bugzilla.mozilla.org/show_bug.cgi?id=1181443. If you find
> yourself in the mood for some not-too-taxing refactoring, please feel
> free to take on one or more of the unassigned bugs. The number of
> calls to replace in each bug ranges from one or two up to 21. If you
> have any questions please ask. Thank you.
>
> Nick
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to