mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
bd573c9b9c
Currently the setting of PLDHashTable::ops is very haphazard. - PLDHashTable has no constructor, so it's not auto-nulled, so lots of places null it themselves. - In the fallible PLDHashTable::Init() function, if the entry storage allocation fails we'll be left with a table that has |ops| set -- indicating it's been initialized -- but has null entry storage. I'm not certain this can cause problems but it feels unsafe, and some (but not all) callers of Init() null it on failure. - PLDHashTable does not null |ops| in Finish(), so some (but not all) callers do this themselves. This patch makes things simpler. - It adds a constructor that zeroes |ops|. - It modifies Init() so that it only sets |ops| once success is ensured. - It zeroes |ops| in Finish(). - Finally, it removes all the now-unnecessary |ops| nulling done by the users of PLDHashTable. --HG-- extra : rebase_source : bb34979c218d152562a2f9c7e5215256c111cc5b |
||
---|---|---|
.. | ||
analysis | ||
base | ||
build | ||
doc | ||
forms | ||
generic | ||
inspector | ||
ipc | ||
mathml | ||
media | ||
printing | ||
reftests | ||
style | ||
svg | ||
tables | ||
tools | ||
xul | ||
moz.build |