зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446509 - added final versions of macro for declaring AddRef and Decref; r=froydnj
Also make use of them in a few places. Differential Revision: https://phabricator.services.mozilla.com/D2678 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1030589ee4
Коммит
8f9e8a51b2
|
@ -38,7 +38,7 @@ class Blob : public nsIMutable
|
|||
public:
|
||||
NS_DECL_NSIMUTABLE
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS_FINAL
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Blob, nsIMutable)
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_BLOB_IID)
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class Promise : public nsISupports,
|
|||
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_PROMISE_IID)
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS_FINAL
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Promise)
|
||||
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(Promise)
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ public:
|
|||
typedef mozilla::StaticPresData StaticPresData;
|
||||
using TransactionId = mozilla::layers::TransactionId;
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS_FINAL
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(nsPresContext)
|
||||
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(nsPresContext)
|
||||
|
||||
|
|
|
@ -424,11 +424,17 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS_WITH_RECORDING(mozilla::recordreplay::Behavior::DontPreserve)
|
||||
|
||||
#define NS_DECL_CYCLE_COLLECTING_ISUPPORTS \
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS_META(override)
|
||||
|
||||
#define NS_DECL_CYCLE_COLLECTING_ISUPPORTS_FINAL \
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS_META(final)
|
||||
|
||||
#define NS_DECL_CYCLE_COLLECTING_ISUPPORTS_META(...) \
|
||||
public: \
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID, \
|
||||
void** aInstancePtr) override; \
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release(void) override; \
|
||||
void** aInstancePtr) __VA_ARGS__; \
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef(void) __VA_ARGS__; \
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release(void) __VA_ARGS__; \
|
||||
NS_IMETHOD_(void) DeleteCycleCollectable(void); \
|
||||
typedef mozilla::FalseType HasThreadSafeRefCnt; \
|
||||
protected: \
|
||||
|
|
Загрузка…
Ссылка в новой задаче