Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin

Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
This commit is contained in:
Simon Giesecke
2021-03-10 10:47:47 +00:00
parent f95072bfa2
commit c7a36b5d58
209 changed files with 456 additions and 485 deletions

View File

@@ -21,7 +21,7 @@
#include "nsThreadUtils.h"
#include "nsInterfaceHashtable.h"
#include "nsRefPtrHashtable.h"
#include "nsDataHashtable.h"
#include "nsTHashMap.h"
#include "js/friend/DOMProxy.h" // JS::ExpandoAndGeneration
class nsIMutableArray;
@@ -553,11 +553,10 @@ class HTMLFormElement final : public nsGenericHTMLElement,
/** The currently selected radio button of each group */
nsRefPtrHashtable<nsStringHashKey, HTMLInputElement> mSelectedRadioButtons;
/** The number of required radio button of each group */
nsDataHashtable<nsStringCaseInsensitiveHashKey, uint32_t>
nsTHashMap<nsStringCaseInsensitiveHashKey, uint32_t>
mRequiredRadioButtonCounts;
/** The value missing state of each group */
nsDataHashtable<nsStringCaseInsensitiveHashKey, bool>
mValueMissingRadioGroups;
nsTHashMap<nsStringCaseInsensitiveHashKey, bool> mValueMissingRadioGroups;
/** The pending submission object */
UniquePtr<HTMLFormSubmission> mPendingSubmission;