Bug 1123121 - Mark all nsCOMPtr_helper classes as stack class; r=froydnj

This commit is contained in:
Ehsan Akhgari 2015-01-18 15:17:26 -05:00
parent 955c49cc4a
commit fa5c39586f
8 changed files with 13 additions and 13 deletions

View File

@ -762,7 +762,7 @@ operator!=(NSCAP_Zero* aLhs, const nsAutoArrayPtr<T>& aRhs)
/*****************************************************************************/
template<class T>
class nsQueryObject : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsQueryObject : public nsCOMPtr_helper
{
public:
explicit nsQueryObject(T* aRawPtr)
@ -782,7 +782,7 @@ private:
};
template<class T>
class nsQueryObjectWithError : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsQueryObjectWithError : public nsCOMPtr_helper
{
public:
nsQueryObjectWithError(T* aRawPtr, nsresult* aErrorPtr)

View File

@ -31,7 +31,7 @@ interface nsICollection : nsISerializable
#include "nsCOMPtr.h"
#endif
class nsQueryElementAt : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsQueryElementAt : public nsCOMPtr_helper
{
public:
nsQueryElementAt( nsICollection* aCollection, uint32_t aIndex, nsresult* aErrorPtr )

View File

@ -11,7 +11,7 @@
#include "nsIArray.h"
// helper class for do_QueryElementAt
class nsQueryArrayElementAt : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsQueryArrayElementAt : public nsCOMPtr_helper
{
public:
nsQueryArrayElementAt(nsIArray* aArray, uint32_t aIndex,

View File

@ -145,7 +145,7 @@ dont_AddRef(already_AddRefed<T>&& aAlreadyAddRefedPtr)
*
* See |class nsGetInterface| for an example.
*/
class nsCOMPtr_helper
class MOZ_STACK_CLASS nsCOMPtr_helper
{
public:
virtual nsresult NS_FASTCALL operator()(const nsIID&, void**) const = 0;

View File

@ -26,7 +26,7 @@ nsresult CallGetClassObject(const char* aContractID, const nsIID& aIID,
void** aResult);
class nsCreateInstanceByCID : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsCreateInstanceByCID : public nsCOMPtr_helper
{
public:
nsCreateInstanceByCID(const nsCID& aCID, nsISupports* aOuter,
@ -45,7 +45,7 @@ private:
nsresult* mErrorPtr;
};
class nsCreateInstanceByContractID : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsCreateInstanceByContractID : public nsCOMPtr_helper
{
public:
nsCreateInstanceByContractID(const char* aContractID, nsISupports* aOuter,
@ -64,7 +64,7 @@ private:
nsresult* mErrorPtr;
};
class nsCreateInstanceFromFactory : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsCreateInstanceFromFactory : public nsCOMPtr_helper
{
public:
nsCreateInstanceFromFactory(nsIFactory* aFactory, nsISupports* aOuter,
@ -123,7 +123,7 @@ do_CreateInstance(nsIFactory* aFactory, nsISupports* aOuter,
}
class nsGetClassObjectByCID : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsGetClassObjectByCID : public nsCOMPtr_helper
{
public:
nsGetClassObjectByCID(const nsCID& aCID, nsresult* aErrorPtr)
@ -139,7 +139,7 @@ private:
nsresult* mErrorPtr;
};
class nsGetClassObjectByContractID : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsGetClassObjectByContractID : public nsCOMPtr_helper
{
public:
nsGetClassObjectByContractID(const char* aContractID, nsresult* aErrorPtr)

View File

@ -22,7 +22,7 @@ CallGetInterface(T* aSource, DestinationType** aDestination)
reinterpret_cast<void**>(aDestination));
}
class nsGetInterface : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsGetInterface : public nsCOMPtr_helper
{
public:
nsGetInterface(nsISupports* aSource, nsresult* aError)

View File

@ -30,7 +30,7 @@ CallQueryReferent(T* aSource, DestinationType** aDestination)
}
class nsQueryReferent : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsQueryReferent : public nsCOMPtr_helper
{
public:
nsQueryReferent(nsIWeakReference* aWeakPtr, nsresult* aError)

View File

@ -34,7 +34,7 @@ do_GetService(const char* aContractID, nsresult* aError)
return nsGetServiceByContractIDWithError(aContractID, aError);
}
class nsGetServiceFromCategory : public nsCOMPtr_helper
class MOZ_STACK_CLASS nsGetServiceFromCategory : public nsCOMPtr_helper
{
public:
nsGetServiceFromCategory(const char* aCategory, const char* aEntry,