зеркало из https://github.com/mozilla/gecko-dev.git
Remove static IID kISupportsIID from the default QueryInterfaces implementation macro. Replace with call to nsISupports::GetIID(). Tested by dp, myself and tague on the 3 main platforms (Win32, Linux and Mac respectively).
This commit is contained in:
Родитель
288da9f9ef
Коммит
2c4766ddbd
|
@ -243,14 +243,13 @@ NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \
|
|||
\
|
||||
*aInstancePtr = NULL; \
|
||||
\
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); \
|
||||
static NS_DEFINE_IID(kClassIID, _classiiddef); \
|
||||
if (aIID.Equals(kClassIID)) { \
|
||||
*aInstancePtr = (void*) this; \
|
||||
NS_ADDREF_THIS(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
if (aIID.Equals(kISupportsIID)) { \
|
||||
if (aIID.Equals(nsISupports::GetIID())) { \
|
||||
*aInstancePtr = (void*) ((nsISupports*)this); \
|
||||
NS_ADDREF_THIS(); \
|
||||
return NS_OK; \
|
||||
|
|
|
@ -243,14 +243,13 @@ NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \
|
|||
\
|
||||
*aInstancePtr = NULL; \
|
||||
\
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); \
|
||||
static NS_DEFINE_IID(kClassIID, _classiiddef); \
|
||||
if (aIID.Equals(kClassIID)) { \
|
||||
*aInstancePtr = (void*) this; \
|
||||
NS_ADDREF_THIS(); \
|
||||
return NS_OK; \
|
||||
} \
|
||||
if (aIID.Equals(kISupportsIID)) { \
|
||||
if (aIID.Equals(nsISupports::GetIID())) { \
|
||||
*aInstancePtr = (void*) ((nsISupports*)this); \
|
||||
NS_ADDREF_THIS(); \
|
||||
return NS_OK; \
|
||||
|
|
Загрузка…
Ссылка в новой задаче