mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 20:49:27 +00:00
Fixing nsrefcnt to be unsigned long to maintain binary compatibility. All Addref() and Release() prototypes modified appropriately
This commit is contained in:
parent
7ae81ff69f
commit
b21d1e72dc
@ -332,7 +332,7 @@ nsMsgDatabase::~nsMsgDatabase()
|
||||
|
||||
NS_IMPL_ADDREF(nsMsgDatabase)
|
||||
|
||||
NS_IMETHODIMP nsMsgDatabase::Release(void)
|
||||
NS_IMETHODIMP_(nsrefcnt) nsMsgDatabase::Release(void)
|
||||
{
|
||||
NS_PRECONDITION(0 != mRefCnt, "dup release");
|
||||
if (--mRefCnt == 0) // OK, the cache is no longer holding onto this, so we really want to delete it,
|
||||
|
@ -60,17 +60,12 @@ struct JSContext;
|
||||
* To maintain binary compatibility of nsISupports with nsIUnknown, we are
|
||||
* doing this ifdeffing.
|
||||
*/
|
||||
#if 0
|
||||
// Disable this until mailnews and other code that has specific implementations
|
||||
// of Release is fixed.
|
||||
#if defined(XP_PC) && PR_BYTES_PER_LONG == 4
|
||||
typedef unsigned long nsrefcnt;
|
||||
#else
|
||||
typedef PRUint32 nsrefcnt;
|
||||
#endif
|
||||
#else
|
||||
typedef PRUint32 nsrefcnt;
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Base class for all XPCOM objects to use. This macro forces the C++
|
||||
|
@ -60,17 +60,12 @@ struct JSContext;
|
||||
* To maintain binary compatibility of nsISupports with nsIUnknown, we are
|
||||
* doing this ifdeffing.
|
||||
*/
|
||||
#if 0
|
||||
// Disable this until mailnews and other code that has specific implementations
|
||||
// of Release is fixed.
|
||||
#if defined(XP_PC) && PR_BYTES_PER_LONG == 4
|
||||
typedef unsigned long nsrefcnt;
|
||||
#else
|
||||
typedef PRUint32 nsrefcnt;
|
||||
#endif
|
||||
#else
|
||||
typedef PRUint32 nsrefcnt;
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Base class for all XPCOM objects to use. This macro forces the C++
|
||||
|
@ -305,14 +305,14 @@ nsInstallTriggerFactory::QueryInterface(REFNSIID aIID,void** aInstancePtr)
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
nsInstallTriggerFactory::AddRef(void)
|
||||
{
|
||||
return ++mRefCnt;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
nsInstallTriggerFactory::Release(void)
|
||||
{
|
||||
if (--mRefCnt ==0)
|
||||
|
@ -379,14 +379,14 @@ nsInstallVersionFactory::QueryInterface(REFNSIID aIID,void** aInstancePtr)
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
nsInstallVersionFactory::AddRef(void)
|
||||
{
|
||||
return ++mRefCnt;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
nsInstallVersionFactory::Release(void)
|
||||
{
|
||||
if (--mRefCnt ==0)
|
||||
@ -431,4 +431,4 @@ nsInstallVersionFactory::LockFactory(PRBool aLock)
|
||||
PR_AtomicDecrement(&gInstallVersionLock);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user