Fixed AddRef/Release problems to eliminate negative refcounts in Bloaty.
git-svn-id: svn://10.0.0.236/trunk@50188 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -253,23 +253,8 @@ nsWebShellWindow::~nsWebShellWindow()
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt) nsWebShellWindow::AddRef(void)
|
||||
{
|
||||
NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt");
|
||||
++mRefCnt;
|
||||
return mRefCnt;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt) nsWebShellWindow::Release(void)
|
||||
{
|
||||
NS_PRECONDITION(0 != mRefCnt, "dup release");
|
||||
--mRefCnt;
|
||||
if (mRefCnt == 0) {
|
||||
NS_DELETEXPCOM(this);
|
||||
return 0;
|
||||
}
|
||||
return mRefCnt;
|
||||
}
|
||||
NS_IMPL_ADDREF(nsWebShellWindow);
|
||||
NS_IMPL_RELEASE(nsWebShellWindow);
|
||||
|
||||
nsresult
|
||||
nsWebShellWindow::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
|
||||
Reference in New Issue
Block a user