Explode addref & release macros to make debugging easier.

git-svn-id: svn://10.0.0.236/trunk@35929 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sfraser%netscape.com
1999-06-19 22:07:13 +00:00
parent 10f8d0856d
commit 5e9f7ed87b

View File

@@ -225,9 +225,23 @@ nsWebShellWindow::~nsWebShellWindow()
}
NS_IMETHODIMP_(nsrefcnt) nsWebShellWindow::AddRef(void)
{
NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt");
++mRefCnt;
return mRefCnt;
}
NS_IMPL_ADDREF(nsWebShellWindow);
NS_IMPL_RELEASE(nsWebShellWindow);
NS_IMETHODIMP_(nsrefcnt) nsWebShellWindow::Release(void)
{
NS_PRECONDITION(0 != mRefCnt, "dup release");
--mRefCnt;
if (mRefCnt == 0) {
NS_DELETEXPCOM(this);
return 0;
}
return mRefCnt;
}
nsresult
nsWebShellWindow::QueryInterface(REFNSIID aIID, void** aInstancePtr)