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:
Alex Gaynor 2018-08-07 18:25:49 +00:00
Родитель 1030589ee4
Коммит 8f9e8a51b2
4 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -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: \