I had to back these changes out due to some infrequent and
intermittent crashes and assertion failures, alas.

Nick

On Wed, Feb 4, 2015 at 7:45 PM, Nicholas Nethercote
<n.netherc...@gmail.com> wrote:
> Hi,
>
> I just landed the patches in
> https://bugzilla.mozilla.org/show_bug.cgi?id=1050035. They
> affect PLDHashTable's API in the following ways.
>
> - PLDHashTable now allocates its entry storage lazily. (nsTHashtable and
>   friends do too, since they are just layers on top of PLDHashTable.) This is 
> a
>   nice space win because about 45% of all created PLDHashTables never get any
>   elements inserted into them.
>
> - As a result, PL_DHashTableInit() is now infallible. This is possible because
>   the allocation of entry storage now only occurs on table insertion, in
>   PL_DHashTableAdd().
>
> - An infallible version of PL_DHashTableAdd() has been added. To use the
>   fallible version you need a |fallible_t| argument. All the old callsites 
> were
>   updated appropriately, to keep them fallible.
>
> - PLD_NewDHashTable() and PLD_HashTableDestroy() have been removed. You should
>   now just use |new|+PL_DHashTableInit() and PLD_HashTableDestroy()+|delete|,
>   which are more obvious and only slightly more verbose. (And I have plans to
>   add a destructor and an initializing constructor, so in the end you'll be
>   able to just use |new| and |delete|).
>
> I prepared a comm-central update patch in
> https://bugzilla.mozilla.org/show_bug.cgi?id=1129692.
>
> Nick
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to