Explode addref & release macros to make debugging easier.

This commit is contained in:
sfraser%netscape.com 1999-06-19 22:07:13 +00:00
Родитель 6357c6d07e
Коммит aa1ba6ea79
1 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -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_IMETHODIMP_(nsrefcnt) nsWebShellWindow::Release(void)
NS_IMPL_RELEASE(nsWebShellWindow); {
NS_PRECONDITION(0 != mRefCnt, "dup release");
--mRefCnt;
if (mRefCnt == 0) {
NS_DELETEXPCOM(this);
return 0;
}
return mRefCnt;
}
nsresult nsresult
nsWebShellWindow::QueryInterface(REFNSIID aIID, void** aInstancePtr) nsWebShellWindow::QueryInterface(REFNSIID aIID, void** aInstancePtr)