gecko/xpcom/ds
Nicholas Nethercote a5c8dbfaf4 Bug 1123151 (part 1) - Set PLDHashTable::ops consistently. r=froydnj.
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
2015-01-19 16:01:24 -08:00
..
moz.build Bug 1039924 part 5 - Add StickyTimeDuration; r=froydnj 2014-09-25 14:25:50 +09:00
nsArray.cpp Bug 1122991 - Mark findIndexOfClosure as stack class, and make its targetElement member a void*; r=froydnj 2015-01-19 10:00:32 -05:00
nsArray.h Bug 1045065 - Fix some bad implicit constructors in xpcom; r=froydnj 2014-07-28 13:19:06 -04:00
nsAtomService.cpp
nsAtomService.h
nsAtomTable.cpp Bug 1123151 (part 1) - Set PLDHashTable::ops consistently. r=froydnj. 2015-01-19 16:01:24 -08:00
nsAtomTable.h Bug 1046477 (part 1) - Separate the reporting of the main and static atoms tables. r=froydnj. 2014-07-30 23:06:57 -07:00
nsCharSeparatedTokenizer.h Bug 1046841 - Convert remaining files in xpcom/{ds,glue,sample}/ to Gecko style. r=froydnj 2014-08-25 12:17:28 -07:00
nsCheapSets.h
nsCRT.cpp
nsCRT.h
nsExpirationTracker.h Bug 1046841 - Fix more style violations in previously touched .h files in xpcom/. r=froydnj 2014-08-25 12:17:24 -07:00
nsHashPropertyBag.cpp Bug 931285, part 2 - Implement a cycle collected version of nsHashPropertyBag and use it from JS. r=froydnj 2014-09-08 09:41:32 -07:00
nsHashPropertyBag.h Bug 931285, part 2 - Implement a cycle collected version of nsHashPropertyBag and use it from JS. r=froydnj 2014-09-08 09:41:32 -07:00
nsIArray.idl
nsIAtom.idl
nsIAtomService.idl
nsICollection.idl bug 1122100 - more MOZ_OVERRIDE in xpcomish stuff r=froydnj 2015-01-19 17:41:12 -05:00
nsIEnumerator.idl
nsIHashable.idl
nsIINIParser.idl
nsIMutableArray.idl
nsINIParserImpl.cpp
nsINIParserImpl.h
nsINIProcessor.js
nsINIProcessor.manifest
nsIObserver.idl
nsIObserverService.idl
nsIPersistentProperties2.idl Bug 1122989 - Remove nsIPersistentProperties::Subclass(); r=froydnj 2015-01-19 08:59:01 -05:00
nsIPersistentProperties.h
nsIProperties.idl
nsIProperty.idl
nsIPropertyBag2.idl
nsIPropertyBag.idl
nsISerializable.idl
nsISimpleEnumerator.idl
nsIStringEnumerator.idl
nsISupportsArray.idl
nsISupportsIterators.idl
nsISupportsPrimitives.idl
nsIVariant.idl
nsIWindowsRegKey.idl
nsIWritablePropertyBag2.idl
nsIWritablePropertyBag.idl
nsMathUtils.h
nsObserverList.cpp
nsObserverList.h Bug 1045065 - Fix some bad implicit constructors in xpcom; r=froydnj 2014-07-28 13:19:06 -04:00
nsObserverService.cpp
nsObserverService.h
nsPersistentProperties.cpp Bug 1122990 - Mark nsPropertiesParser as stack class, and make its mProps member a strong ref; r=froydnj 2015-01-19 10:00:31 -05:00
nsPersistentProperties.h Bug 1122989 - Remove nsIPersistentProperties::Subclass(); r=froydnj 2015-01-19 08:59:01 -05:00
nsProperties.cpp
nsProperties.h Bug 1046841 - Fix more style violations in previously touched .h files in xpcom/. r=froydnj 2014-08-25 12:17:24 -07:00
nsStaticAtom.h Bug 1123109 - Mark nsStaticAtom::mStringBuffer as non-owning; r=froydnj 2015-01-19 09:05:44 -05:00
nsStaticNameTable.cpp Bug 1123151 (part 1) - Set PLDHashTable::ops consistently. r=froydnj. 2015-01-19 16:01:24 -08:00
nsStaticNameTable.h Bug 1050009 - Initialize pldhash tables with a length, not a capacity. r=roc. 2014-08-06 06:31:21 -07:00
nsStringEnumerator.cpp Bug 1117035 - Mark virtual overridden functions as MOZ_OVERRIDE in XPCOM; r=froydnj 2015-01-05 11:25:41 -05:00
nsStringEnumerator.h
nsSupportsArray.cpp Bug 1117035 - Mark virtual overridden functions as MOZ_OVERRIDE in XPCOM; r=froydnj 2015-01-05 11:25:41 -05:00
nsSupportsArray.h Bug 1117035 - Mark virtual overridden functions as MOZ_OVERRIDE in XPCOM; r=froydnj 2015-01-05 11:25:41 -05:00
nsSupportsArrayEnumerator.cpp Bug 1122996 - Convert nsSupportsArrayEnumerator::mArray into an nsCOMPtr; r=froydnj 2015-01-19 09:03:56 -05:00
nsSupportsArrayEnumerator.h Bug 1122996 - Convert nsSupportsArrayEnumerator::mArray into an nsCOMPtr; r=froydnj 2015-01-19 09:03:56 -05:00
nsSupportsPrimitives.cpp
nsSupportsPrimitives.h Bug 1045065 - Fix some bad implicit constructors in xpcom; r=froydnj 2014-07-28 13:19:06 -04:00
nsVariant.cpp
nsVariant.h Bug 1123000 - Mark nsDiscriminatedUnion::mInterfaceValue as owning; r=froydnj 2015-01-19 10:00:33 -05:00
nsWhitespaceTokenizer.h Bug 1046841 - Convert remaining files in xpcom/{ds,glue,sample}/ to Gecko style. r=froydnj 2014-08-25 12:17:28 -07:00
nsWindowsRegKey.cpp
nsWindowsRegKey.h
StickyTimeDuration.h Bug 1039924 part 8 - Include FloatingPoint.h in StickyTimeDuration.h; r=froydnj 2014-09-25 14:35:51 +09:00
TimeStamp_darwin.cpp Bug 1074651 - Detect integer overflow in BaseTimeDuration::TicksFromMilliseconds; r=bz 2014-10-02 15:14:12 +09:00
TimeStamp_posix.cpp Bug 1074651 - Detect integer overflow in BaseTimeDuration::TicksFromMilliseconds; r=bz 2014-10-02 15:14:12 +09:00
TimeStamp_windows.cpp Bug 1092130 - Fixed build errors found by mingw after bug 1076698 landed (-Werror=missing-braces errors). r=cpearce 2014-11-03 10:28:52 +01:00
TimeStamp_windows.h
TimeStamp.cpp
TimeStamp.h Bug 1118486 - Part 1: Use = delete instead of MOZ_DELETE directly; r=Waldo 2015-01-08 23:19:05 -05:00