Bug 1723050 - Part 17: Replace typedef by using in dom/localstorage/ r=dom-storage-reviewers,janv

Differential Revision: https://phabricator.services.mozilla.com/D121315
This commit is contained in:
Kagami Sascha Rosylight 2021-08-16 17:05:41 +00:00
parent a4e305afc2
commit bdf127087c
4 changed files with 14 additions and 13 deletions

View File

@ -172,8 +172,8 @@ class PreparedDatastore;
class QuotaClient;
class Snapshot;
typedef nsClassHashtable<nsCStringHashKey, ArchivedOriginInfo>
ArchivedOriginHashtable;
using ArchivedOriginHashtable =
nsClassHashtable<nsCStringHashKey, ArchivedOriginInfo>;
/*******************************************************************************
* Constants
@ -2732,8 +2732,9 @@ class nsCStringHashKeyDM : public nsCStringHashKey {
// When CheckedUnsafePtr's checking is enabled, it's necessary to ensure that
// the hashtable uses the copy constructor instead of memmove for moving entries
// since memmove will break CheckedUnsafePtr in a memory-corrupting way.
typedef std::conditional<DiagnosticAssertEnabled::value, nsCStringHashKeyDM,
nsCStringHashKey>::type DatastoreHashKey;
using DatastoreHashKey =
std::conditional<DiagnosticAssertEnabled::value, nsCStringHashKeyDM,
nsCStringHashKey>::type;
using DatastoreHashtable =
nsBaseHashtable<DatastoreHashKey, NotNull<CheckedUnsafePtr<Datastore>>,
@ -2743,8 +2744,8 @@ StaticAutoPtr<DatastoreHashtable> gDatastores;
uint64_t gLastDatastoreId = 0;
typedef nsClassHashtable<nsUint64HashKey, PreparedDatastore>
PreparedDatastoreHashtable;
using PreparedDatastoreHashtable =
nsClassHashtable<nsUint64HashKey, PreparedDatastore>;
StaticAutoPtr<PreparedDatastoreHashtable> gPreparedDatastores;
@ -2779,12 +2780,12 @@ StaticRefPtr<ConnectionThread> gConnectionThread;
uint64_t gLastObserverId = 0;
typedef nsRefPtrHashtable<nsUint64HashKey, Observer> PreparedObserverHashtable;
using PreparedObserverHashtable = nsRefPtrHashtable<nsUint64HashKey, Observer>;
StaticAutoPtr<PreparedObserverHashtable> gPreparedObsevers;
typedef nsClassHashtable<nsCStringHashKey, nsTArray<NotNull<Observer*>>>
ObserverHashtable;
using ObserverHashtable =
nsClassHashtable<nsCStringHashKey, nsTArray<NotNull<Observer*>>>;
StaticAutoPtr<ObserverHashtable> gObservers;
@ -2794,7 +2795,7 @@ Atomic<int32_t, Relaxed> gSnapshotGradualPrefill(
kDefaultSnapshotGradualPrefill);
Atomic<bool> gClientValidation(kDefaultClientValidation);
typedef nsTHashMap<nsCStringHashKey, int64_t> UsageHashtable;
using UsageHashtable = nsTHashMap<nsCStringHashKey, int64_t>;
StaticAutoPtr<ArchivedOriginHashtable> gArchivedOrigins;

View File

@ -39,7 +39,7 @@ namespace {
#define XPCOM_SHUTDOWN_OBSERVER_TOPIC "xpcom-shutdown"
typedef nsTHashMap<nsCStringHashKey, LSDatabase*> LSDatabaseHashtable;
using LSDatabaseHashtable = nsTHashMap<nsCStringHashKey, LSDatabase*>;
StaticAutoPtr<LSDatabaseHashtable> gLSDatabases;

View File

@ -70,7 +70,7 @@ class LSRequestResponse;
* parent Datastore at the moment the Snapshot was created.
*/
class LSObject final : public Storage {
typedef mozilla::ipc::PrincipalInfo PrincipalInfo;
using PrincipalInfo = mozilla::ipc::PrincipalInfo;
friend nsGlobalWindowInner;

View File

@ -19,7 +19,7 @@ namespace mozilla::dom {
namespace {
typedef nsTHashMap<nsCStringHashKey, LSObserver*> LSObserverHashtable;
using LSObserverHashtable = nsTHashMap<nsCStringHashKey, LSObserver*>;
StaticAutoPtr<LSObserverHashtable> gLSObservers;