зеркало из https://github.com/mozilla/pjs.git
Work on 15824 bad refcounting in nsCodebasePrincipal
Attempt to discover problem with additional assertions reviewed by mstoltz@netscape.com
This commit is contained in:
Родитель
edbf131410
Коммит
34fd57f168
|
@ -34,6 +34,7 @@ NS_IMPL_QUERY_INTERFACE2(nsCodebasePrincipal, nsICodebasePrincipal, nsIPrincipal
|
|||
NS_IMETHODIMP_(nsrefcnt)
|
||||
nsCodebasePrincipal::AddRef(void)
|
||||
{
|
||||
NS_PRECONDITION(PRInt32(mRefCnt) == 0, "illegal mRefCnt");
|
||||
NS_PRECONDITION(PRInt32(mJSPrincipals.refcount) >= 0, "illegal refcnt");
|
||||
++mJSPrincipals.refcount;
|
||||
NS_LOG_ADDREF(this, mJSPrincipals.refcount, "nsCodebasePrincipal", sizeof(*this));
|
||||
|
@ -43,6 +44,7 @@ nsCodebasePrincipal::AddRef(void)
|
|||
NS_IMETHODIMP_(nsrefcnt)
|
||||
nsCodebasePrincipal::Release(void)
|
||||
{
|
||||
NS_PRECONDITION(PRInt32(mRefCnt) == 0, "illegal mRefCnt");
|
||||
NS_PRECONDITION(0 != mJSPrincipals.refcount, "dup release");
|
||||
--mJSPrincipals.refcount;
|
||||
NS_LOG_RELEASE(this, mJSPrincipals.refcount, "nsCodebasePrincipal");
|
||||
|
|
Загрузка…
Ссылка в новой задаче