зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/storage. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D62560 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
86a8576927
Коммит
7ca58631a4
|
@ -60,7 +60,7 @@ LocalStorage::LocalStorage(nsPIDOMWindowInner* aWindow,
|
||||||
mCache->Preload();
|
mCache->Preload();
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalStorage::~LocalStorage() {}
|
LocalStorage::~LocalStorage() = default;
|
||||||
|
|
||||||
int64_t LocalStorage::GetOriginQuotaUsage() const {
|
int64_t LocalStorage::GetOriginQuotaUsage() const {
|
||||||
return mCache->GetOriginQuotaUsage(this);
|
return mCache->GetOriginQuotaUsage(this);
|
||||||
|
|
|
@ -62,7 +62,7 @@ class LocalStorageCacheBridge {
|
||||||
virtual void LoadWait() = 0;
|
virtual void LoadWait() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~LocalStorageCacheBridge() {}
|
virtual ~LocalStorageCacheBridge() = default;
|
||||||
|
|
||||||
ThreadSafeAutoRefCnt mRefCnt;
|
ThreadSafeAutoRefCnt mRefCnt;
|
||||||
NS_DECL_OWNINGTHREAD
|
NS_DECL_OWNINGTHREAD
|
||||||
|
@ -282,7 +282,7 @@ class StorageUsageBridge {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Protected destructor, to discourage deletion outside of Release():
|
// Protected destructor, to discourage deletion outside of Release():
|
||||||
virtual ~StorageUsageBridge() {}
|
virtual ~StorageUsageBridge() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
class StorageUsage : public StorageUsageBridge {
|
class StorageUsage : public StorageUsageBridge {
|
||||||
|
|
|
@ -25,7 +25,7 @@ PartitionedLocalStorage::PartitionedLocalStorage(
|
||||||
nsIPrincipal* aStoragePrincipal, SessionStorageCache* aCache)
|
nsIPrincipal* aStoragePrincipal, SessionStorageCache* aCache)
|
||||||
: Storage(aWindow, aPrincipal, aStoragePrincipal), mCache(aCache) {}
|
: Storage(aWindow, aPrincipal, aStoragePrincipal), mCache(aCache) {}
|
||||||
|
|
||||||
PartitionedLocalStorage::~PartitionedLocalStorage() {}
|
PartitionedLocalStorage::~PartitionedLocalStorage() = default;
|
||||||
|
|
||||||
int64_t PartitionedLocalStorage::GetOriginQuotaUsage() const {
|
int64_t PartitionedLocalStorage::GetOriginQuotaUsage() const {
|
||||||
return mCache->GetOriginQuotaUsage(SessionStorageCache::eSessionSetType);
|
return mCache->GetOriginQuotaUsage(SessionStorageCache::eSessionSetType);
|
||||||
|
|
|
@ -42,7 +42,7 @@ SessionStorage::SessionStorage(nsPIDOMWindowInner* aWindow,
|
||||||
MOZ_ASSERT(aCache);
|
MOZ_ASSERT(aCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
SessionStorage::~SessionStorage() {}
|
SessionStorage::~SessionStorage() = default;
|
||||||
|
|
||||||
int64_t SessionStorage::GetOriginQuotaUsage() const {
|
int64_t SessionStorage::GetOriginQuotaUsage() const {
|
||||||
return mCache->GetOriginQuotaUsage(DATASET);
|
return mCache->GetOriginQuotaUsage(DATASET);
|
||||||
|
|
|
@ -796,7 +796,7 @@ class OriginAttrsPatternMatchSQLFunction final : public mozIStorageFunction {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OriginAttrsPatternMatchSQLFunction() = delete;
|
OriginAttrsPatternMatchSQLFunction() = delete;
|
||||||
~OriginAttrsPatternMatchSQLFunction() {}
|
~OriginAttrsPatternMatchSQLFunction() = default;
|
||||||
|
|
||||||
OriginAttributesPattern mPattern;
|
OriginAttributesPattern mPattern;
|
||||||
};
|
};
|
||||||
|
|
|
@ -280,7 +280,7 @@ class StorageDBThread final {
|
||||||
Monitor& GetMonitor() { return mMonitor; }
|
Monitor& GetMonitor() { return mMonitor; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~ThreadObserver() {}
|
virtual ~ThreadObserver() = default;
|
||||||
bool mHasPendingEvents;
|
bool mHasPendingEvents;
|
||||||
// The monitor we drive the thread with
|
// The monitor we drive the thread with
|
||||||
Monitor mMonitor;
|
Monitor mMonitor;
|
||||||
|
@ -301,14 +301,14 @@ class StorageDBThread final {
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~ShutdownRunnable() {}
|
~ShutdownRunnable() = default;
|
||||||
|
|
||||||
NS_DECL_NSIRUNNABLE
|
NS_DECL_NSIRUNNABLE
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
StorageDBThread();
|
StorageDBThread();
|
||||||
virtual ~StorageDBThread() {}
|
virtual ~StorageDBThread() = default;
|
||||||
|
|
||||||
static StorageDBThread* Get();
|
static StorageDBThread* Get();
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ using namespace StorageUtils;
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class nsReverseStringSQLFunction final : public mozIStorageFunction {
|
class nsReverseStringSQLFunction final : public mozIStorageFunction {
|
||||||
~nsReverseStringSQLFunction() {}
|
~nsReverseStringSQLFunction() = default;
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_MOZISTORAGEFUNCTION
|
NS_DECL_MOZISTORAGEFUNCTION
|
||||||
|
@ -148,7 +148,7 @@ class GetOriginParticular final : public mozIStorageFunction {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GetOriginParticular() = delete;
|
GetOriginParticular() = delete;
|
||||||
~GetOriginParticular() {}
|
~GetOriginParticular() = default;
|
||||||
|
|
||||||
EParticular mParticular;
|
EParticular mParticular;
|
||||||
|
|
||||||
|
@ -189,10 +189,10 @@ GetOriginParticular::OnFunctionCall(mozIStorageValueArray* aFunctionArguments,
|
||||||
|
|
||||||
class StripOriginAddonId final : public mozIStorageFunction {
|
class StripOriginAddonId final : public mozIStorageFunction {
|
||||||
public:
|
public:
|
||||||
explicit StripOriginAddonId() {}
|
explicit StripOriginAddonId() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~StripOriginAddonId() {}
|
~StripOriginAddonId() = default;
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_MOZISTORAGEFUNCTION
|
NS_DECL_MOZISTORAGEFUNCTION
|
||||||
|
|
|
@ -132,7 +132,7 @@ StorageDBChild::StorageDBChild(LocalStorageManager* aManager)
|
||||||
MOZ_ASSERT(!NextGenLocalStorageEnabled());
|
MOZ_ASSERT(!NextGenLocalStorageEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
StorageDBChild::~StorageDBChild() {}
|
StorageDBChild::~StorageDBChild() = default;
|
||||||
|
|
||||||
// static
|
// static
|
||||||
StorageDBChild* StorageDBChild::Get() {
|
StorageDBChild* StorageDBChild::Get() {
|
||||||
|
|
|
@ -276,7 +276,7 @@ class StorageDBParent final : public PBackgroundStorageParent {
|
||||||
mOriginNoSuffix(aOriginNoSuffix),
|
mOriginNoSuffix(aOriginNoSuffix),
|
||||||
mLoaded(false),
|
mLoaded(false),
|
||||||
mLoadedCount(0) {}
|
mLoadedCount(0) {}
|
||||||
virtual ~CacheParentBridge() {}
|
virtual ~CacheParentBridge() = default;
|
||||||
|
|
||||||
// LocalStorageCacheBridge
|
// LocalStorageCacheBridge
|
||||||
virtual const nsCString Origin() const override;
|
virtual const nsCString Origin() const override;
|
||||||
|
@ -315,7 +315,7 @@ class StorageDBParent final : public PBackgroundStorageParent {
|
||||||
: mOwningEventTarget(GetCurrentThreadSerialEventTarget()),
|
: mOwningEventTarget(GetCurrentThreadSerialEventTarget()),
|
||||||
mParent(aParentDB),
|
mParent(aParentDB),
|
||||||
mOriginScope(aOriginScope) {}
|
mOriginScope(aOriginScope) {}
|
||||||
virtual ~UsageParentBridge() {}
|
virtual ~UsageParentBridge() = default;
|
||||||
|
|
||||||
// StorageUsageBridge
|
// StorageUsageBridge
|
||||||
virtual const nsCString& OriginScope() override { return mOriginScope; }
|
virtual const nsCString& OriginScope() override { return mOriginScope; }
|
||||||
|
|
|
@ -24,7 +24,7 @@ class StorageObserver;
|
||||||
// content processes.
|
// content processes.
|
||||||
class StorageObserverSink {
|
class StorageObserverSink {
|
||||||
public:
|
public:
|
||||||
virtual ~StorageObserverSink() {}
|
virtual ~StorageObserverSink() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class StorageObserver;
|
friend class StorageObserver;
|
||||||
|
@ -53,7 +53,7 @@ class StorageObserver : public nsIObserver, public nsSupportsWeakReference {
|
||||||
void NoteBackgroundThread(nsIEventTarget* aBackgroundThread);
|
void NoteBackgroundThread(nsIEventTarget* aBackgroundThread);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~StorageObserver() {}
|
virtual ~StorageObserver() = default;
|
||||||
|
|
||||||
nsresult GetOriginScope(const char16_t* aData, nsACString& aOriginScope);
|
nsresult GetOriginScope(const char16_t* aData, nsACString& aOriginScope);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче