mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 786008 - Add a debug check to make sure that QueryInterface implementations always handle nsISupports; r=ehsan
This commit is contained in:
parent
1404308f43
commit
1aa2c9126d
@ -30,6 +30,8 @@
|
||||
#include "nsCycleCollector.h"
|
||||
#include "nsCycleCollectorUtils.h"
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Macros to help detect thread-safety:
|
||||
|
||||
@ -666,7 +668,11 @@ NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \
|
||||
foundInterface = 0; \
|
||||
nsresult status; \
|
||||
if ( !foundInterface ) \
|
||||
status = NS_NOINTERFACE; \
|
||||
{ \
|
||||
/* nsISupports should be handled by this point. If not, fail. */ \
|
||||
MOZ_ASSERT(!aIID.Equals(NS_GET_IID(nsISupports))); \
|
||||
status = NS_NOINTERFACE; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
NS_ADDREF(foundInterface); \
|
||||
|
Loading…
Reference in New Issue
Block a user