Bug 672843 part B - Remove NS_ENSURE_PROPER_AGGREGATION, r=froydnj

This commit is contained in:
Benjamin Smedberg 2013-11-19 16:27:36 -05:00
parent f9d80661a4
commit d866f6b84f
2 changed files with 6 additions and 9 deletions

View File

@ -285,9 +285,9 @@ static nsresult \
_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \
void **aResult) \
{ \
*aResult = nullptr; \
\
NS_ENSURE_PROPER_AGGREGATION(aOuter, aIID); \
*aResult = nullptr; \
if (NS_WARN_IF(aOuter && !aIID.Equals(NS_GET_IID(nsISupports)))) \
return NS_ERROR_INVALID_ARG; \
\
_InstanceClass* inst = new _InstanceClass(aOuter); \
if (!inst) { \
@ -308,9 +308,9 @@ static nsresult \
_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \
void **aResult) \
{ \
*aResult = nullptr; \
\
NS_ENSURE_PROPER_AGGREGATION(aOuter, aIID); \
*aResult = nullptr; \
if (NS_WARN_IF(aOuter && !aIID.Equals(NS_GET_IID(nsISupports)))) \
return NS_ERROR_INVALID_ARG; \
\
_InstanceClass* inst = new _InstanceClass(aOuter); \
if (!inst) { \

View File

@ -375,9 +375,6 @@ inline bool NS_warn_if_impl(bool condition, const char* expr, const char* file,
#define NS_ENSURE_NO_AGGREGATION(outer) \
NS_ENSURE_FALSE(outer, NS_ERROR_NO_AGGREGATION)
#define NS_ENSURE_PROPER_AGGREGATION(outer, iid) \
NS_ENSURE_FALSE(outer && !iid.Equals(NS_GET_IID(nsISupports)), NS_ERROR_INVALID_ARG)
/*****************************************************************************/
#ifdef XPCOM_GLUE