mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1723050 - Part 33: Replace typedef by using in dom/workers/ r=dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D121331
This commit is contained in:
parent
b44f8dfcc2
commit
a5c1c0a660
@ -167,7 +167,7 @@ struct PrefTraits;
|
||||
|
||||
template <>
|
||||
struct PrefTraits<bool> {
|
||||
typedef bool PrefValueType;
|
||||
using PrefValueType = bool;
|
||||
|
||||
static const PrefValueType kDefaultValue = false;
|
||||
|
||||
@ -184,7 +184,7 @@ struct PrefTraits<bool> {
|
||||
|
||||
template <>
|
||||
struct PrefTraits<int32_t> {
|
||||
typedef int32_t PrefValueType;
|
||||
using PrefValueType = int32_t;
|
||||
|
||||
static inline PrefValueType Get(const char* aPref) {
|
||||
AssertIsOnMainThread();
|
||||
@ -203,7 +203,7 @@ T GetWorkerPref(const nsACString& aPref,
|
||||
bool* aPresent = nullptr) {
|
||||
AssertIsOnMainThread();
|
||||
|
||||
typedef PrefTraits<T> PrefHelper;
|
||||
using PrefHelper = PrefTraits<T>;
|
||||
|
||||
T result;
|
||||
bool present = true;
|
||||
|
@ -65,7 +65,7 @@ class MainThreadReleaseRunnable final : public Runnable {
|
||||
// Specialize this if there's some class that has multiple nsISupports bases.
|
||||
template <class T>
|
||||
struct ISupportsBaseInfo {
|
||||
typedef T ISupportsBase;
|
||||
using ISupportsBase = T;
|
||||
};
|
||||
|
||||
template <template <class> class SmartPtr, class T>
|
||||
|
@ -35,8 +35,8 @@ class Connection;
|
||||
} // namespace network
|
||||
|
||||
class WorkerNavigator final : public nsWrapperCache {
|
||||
typedef struct workerinternals::RuntimeService::NavigatorProperties
|
||||
NavigatorProperties;
|
||||
using NavigatorProperties =
|
||||
workerinternals::RuntimeService::NavigatorProperties;
|
||||
|
||||
NavigatorProperties mProperties;
|
||||
RefPtr<StorageManager> mStorageManager;
|
||||
|
@ -144,8 +144,8 @@ const uint32_t kClampTimeoutNestingLevel = 5u;
|
||||
|
||||
template <class T>
|
||||
class UniquePtrComparator {
|
||||
typedef UniquePtr<T> A;
|
||||
typedef T* B;
|
||||
using A = UniquePtr<T>;
|
||||
using B = T*;
|
||||
|
||||
public:
|
||||
bool Equals(const A& a, const A& b) const {
|
||||
|
@ -78,7 +78,7 @@ class WorkerThread;
|
||||
// object. It exists to avoid changing a lot of code to use Mutex* instead of
|
||||
// Mutex&.
|
||||
class SharedMutex {
|
||||
typedef mozilla::Mutex Mutex;
|
||||
using Mutex = mozilla::Mutex;
|
||||
|
||||
class RefCountedMutex final : public Mutex {
|
||||
public:
|
||||
|
@ -32,8 +32,8 @@ class SharedWorkerChild;
|
||||
* we only allow top-level windows to create SharedWorkers.
|
||||
*/
|
||||
class SharedWorker final : public DOMEventTargetHelper {
|
||||
typedef mozilla::ErrorResult ErrorResult;
|
||||
typedef mozilla::dom::GlobalObject GlobalObject;
|
||||
using ErrorResult = mozilla::ErrorResult;
|
||||
using GlobalObject = mozilla::dom::GlobalObject;
|
||||
|
||||
RefPtr<nsPIDOMWindowInner> mWindow;
|
||||
RefPtr<SharedWorkerChild> mActor;
|
||||
|
Loading…
Reference in New Issue
Block a user