mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Work on 15824 bad refcounting in nsCodebasePrincipal
Attempt to discover problem with additional assertions reviewed by mstoltz@netscape.com
This commit is contained in:
parent
46bb0d4e8a
commit
822d5724d3
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user