зеркало из https://github.com/mozilla/pjs.git
Explode addref & release macros to make debugging easier.
This commit is contained in:
Родитель
6357c6d07e
Коммит
aa1ba6ea79
|
@ -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)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче