gecko-dev/xpcom/ds
Jan Varga 6543a55a77 Bug 1681469 - Allow nsBaseHashtable to work with a non-default-constructible/non-movable DataType; r=nika
nsBaseHashtable now supports non-default-constructible DataType and
UserDataType, however not all methods can be instantiated.  All methods which
can't be instantiated with non-default-constructible DataType or UserDataType
are now described as such in method definitions.

The public API of PLDHashTable and nsBaseHashtable/nsDataHashtable was changed:
- A new method PLDHashTable::WithEntryHandle has been added. It allows to use a
  custom function for entry initialization (instead of the global hook).
- A new method nsBaseHashtable::MaybeGet has been added.
- A new overload nsBaseHashtable::Remove has been added.
- The nsDataHashtable::GetAndRemove method has been pulled up to
  nsBaseHashtable.

In addition, the following implementation details have changed:

PLDHashTable:
- The code from the Add method has been split into MakeEntryHandle and a helper
  object called EntryHandle. The Add method is now implemented on top of that.

nsTHashtable:
- A new (non-public) API for WithEntryHandle has been added.
- The InitEntry hook is no longer used. Instead of using the hook, PutEntry
  methods now use nsTHashtable::WithEntryHandle instead of PLDHashTable::Add.
  This change allows to do custom initialization in derived classes.

nsBaseHashtable:
- A new (non-public) API for WithEntryHandle has been added.
- Put methods no longer use nsTHashtable::PutEntry, they now use the new method
  nsBaseHashtable::WithEntryHandle.

Differential Revision: https://phabricator.services.mozilla.com/D99428
2021-01-29 08:39:40 +00:00
..
test Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
tools Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
ArenaAllocator.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
ArenaAllocatorExtensions.h
ArrayAlgorithm.h Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem 2020-09-21 13:12:48 +00:00
ArrayIterator.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
Atom.py Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
AtomArray.h Bug 1684673 - Use an AutoTArray for atom arrays in attributes (class / part). r=smaug 2021-01-04 17:56:33 +00:00
Dafsa.cpp
Dafsa.h
HTMLAtoms.py
IncrementalTokenizer.cpp
IncrementalTokenizer.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
MruCache.h
Observer.h Bug 1645339 - Use range-based for with nsTObserverArray in xpcom. r=froydnj 2020-06-15 08:55:27 +00:00
PLDHashTable.cpp Bug 1681469 - Allow nsBaseHashtable to work with a non-default-constructible/non-movable DataType; r=nika 2021-01-29 08:39:40 +00:00
PLDHashTable.h Bug 1681469 - Allow nsBaseHashtable to work with a non-default-constructible/non-movable DataType; r=nika 2021-01-29 08:39:40 +00:00
PerfectHash.h Bug 1625138 - Part 4: Replace mozilla::MakeUnsigned with std::make_unsigned. r=froydnj 2020-03-28 13:57:12 +00:00
SimpleEnumerator.h
StaticAtoms.py Bug 1689034 - part 3: Get rid of keyboard events on plugins r=smaug 2021-01-28 07:48:15 +00:00
StickyTimeDuration.h
Tokenizer.cpp Bug 1679272 - Include ScopeExit.h exactly where used. r=andi 2020-12-07 14:25:59 +00:00
Tokenizer.h Bug 1628713 - Add `Tokenizer::CheckPhrase` to quickly check for compound strings, r=xpcom-reviewers,erahm 2020-07-23 12:57:50 +00:00
components.conf Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi 2020-07-09 21:42:25 +00:00
moz.build Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
nsArray.cpp
nsArray.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsArrayEnumerator.cpp
nsArrayEnumerator.h
nsArrayUtils.cpp
nsArrayUtils.h
nsAtom.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsAtomTable.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
nsAtomTable.h
nsBaseHashtable.h Bug 1681469 - Allow nsBaseHashtable to work with a non-default-constructible/non-movable DataType; r=nika 2021-01-29 08:39:40 +00:00
nsCOMArray.cpp Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
nsCOMArray.h Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
nsCRT.cpp
nsCRT.h Bug 1685052 - Remove unused functions/macros from nsCRT.h. r=xpcom-reviewers,mccr8 2021-01-05 13:11:28 +00:00
nsCharSeparatedTokenizer.h Bug 1679987 - Implement nsTSubstring::Split using nsTokenizedRange. r=xpcom-reviewers,necko-reviewers,nika 2020-12-17 12:36:47 +00:00
nsCheapSets.h Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj 2019-12-20 07:16:43 +00:00
nsClassHashtable.h Bug 1646772 - Add nsClassHashtable::LookupOrAddFromFactory and missing tests for nsClassHashtable::LookupForAdd. r=froydnj 2020-06-22 14:54:18 +00:00
nsDataHashtable.h Bug 1681469 - Allow nsBaseHashtable to work with a non-default-constructible/non-movable DataType; r=nika 2021-01-29 08:39:40 +00:00
nsDeque.cpp Bug 1337953 - Make nsDeque templated on pointer type r=froydnj 2020-06-25 02:39:23 +00:00
nsDeque.h Bug 1683534 - Make `editor` buildable outside of `unified-build` environment. r=sg 2021-01-04 14:18:50 +00:00
nsEnumeratorUtils.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsEnumeratorUtils.h
nsExpirationTracker.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsGkAtoms.cpp
nsGkAtoms.h
nsHashKeys.h Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin 2020-05-27 18:11:12 +00:00
nsHashPropertyBag.cpp Bug 1627389 - Add missing using statements to xpcom/ds. r=xpcom-reviewers,KrisWright 2020-04-06 22:35:20 +00:00
nsHashPropertyBag.h Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown 2020-02-27 17:39:15 +00:00
nsIArray.idl
nsIArrayExtensions.idl
nsIINIParser.idl
nsIMutableArray.idl
nsINIParserImpl.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsINIParserImpl.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsIObserver.idl
nsIObserverService.idl Bug 1612724 - Part 1: Add a NotifyWhenScriptSafe helper method to nsIObserverService, r=froydnj 2020-02-04 22:09:34 +00:00
nsIPersistentProperties.h
nsIPersistentProperties2.idl
nsIProperties.idl
nsIProperty.idl
nsIPropertyBag.idl
nsIPropertyBag2.idl
nsISerializable.idl
nsISimpleEnumerator.idl
nsIStringEnumerator.idl
nsISupportsIterators.idl
nsISupportsPrimitives.idl
nsIVariant.idl
nsIWindowsRegKey.idl
nsIWritablePropertyBag.idl
nsIWritablePropertyBag2.idl
nsInterfaceHashtable.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsJSThingHashtable.h Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
nsMathUtils.h
nsObserverList.cpp Bug 1659955 - Replace output parameter by return value in FillObserverArray and rename accordingly. r=froydnj 2020-08-26 07:24:21 +00:00
nsObserverList.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsObserverService.cpp Bug 1667915 - Separate marker category from marker options - r=gregtatum 2020-10-01 11:02:23 +00:00
nsObserverService.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsPersistentProperties.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsPersistentProperties.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsPointerHashKeys.h Bug 1683561 - Make `accessibility` buildable outside of `unified-build` environment. r=sg 2021-01-05 09:47:12 +00:00
nsProperties.cpp
nsProperties.h
nsQuickSort.cpp Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp 2020-11-18 09:05:59 +00:00
nsQuickSort.h
nsRefPtrHashtable.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsSimpleEnumerator.cpp
nsSimpleEnumerator.h
nsStaticAtomUtils.h
nsStaticNameTable.cpp
nsStaticNameTable.h
nsStringEnumerator.cpp
nsStringEnumerator.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsSupportsPrimitives.cpp Bug 1515419 - fixing ToNewCString (and ToNewUnicode as well) xpcom/string/nsReadableUtils.cpp r=froydnj,necko-reviewers,valentin 2020-05-17 06:58:48 +00:00
nsSupportsPrimitives.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsTArray-inl.h Bug 1678309 - Type header pointer when shrinking nsTArray storage r=mccr8 2020-11-30 09:30:14 +00:00
nsTArray.cpp Bug 1676363 - Remove dependency of nsTArray on nsCycleCollectionChild. r=#xpcom-reviewers 2020-11-23 16:09:49 +00:00
nsTArray.h Bug 1676363 - Remove dependency of nsTArray on nsCycleCollectionChild. r=#xpcom-reviewers 2020-11-23 16:09:49 +00:00
nsTArrayForwardDeclare.h Bug 1626570 - Add CopyableTArray. r=xpcom-reviewers,nika 2020-04-30 09:35:57 +00:00
nsTHashtable.h Bug 1681469 - Allow nsBaseHashtable to work with a non-default-constructible/non-movable DataType; r=nika 2021-01-29 08:39:40 +00:00
nsTObserverArray.cpp
nsTObserverArray.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsTPriorityQueue.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsVariant.cpp Bug 1651210 - uint variant values should convert over as uints, not ints r=froydnj 2020-07-09 13:02:29 +00:00
nsVariant.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsWhitespaceTokenizer.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
nsWindowsRegKey.cpp Bug 1684110 - Stop using some 'A'-functions in xpcom/. r=sg 2021-01-04 11:03:31 +00:00
nsWindowsRegKey.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00