Bug 1791767 - Add ISUPPORTS declaration macro for event targets. r=xpcom-reviewers,nika

Differential Revision: https://phabricator.services.mozilla.com/D160813
This commit is contained in:
Jari Jalkanen
2022-11-01 06:37:18 +00:00
parent 526d0153d7
commit addfc433fa

View File

@@ -418,6 +418,18 @@ class ThreadSafeAutoRefCnt {
NS_DECL_OWNINGTHREAD \ NS_DECL_OWNINGTHREAD \
public: public:
#define NS_DECL_ISUPPORTS_ONEVENTTARGET \
public: \
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override; \
NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \
NS_IMETHOD_(MozExternalRefCountType) Release(void) override; \
using HasThreadSafeRefCnt = std::false_type; \
\
protected: \
nsAutoRefCnt mRefCnt; \
NS_DECL_OWNINGEVENTTARGET \
public:
#define NS_DECL_THREADSAFE_ISUPPORTS \ #define NS_DECL_THREADSAFE_ISUPPORTS \
public: \ public: \
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override; \ NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override; \