зеркало из https://github.com/mozilla/pjs.git
Bug 277741 bad copy/paste of NS_ASSERT_OWNINGTHREAD(_class)
r=dbradley sr=dbaron
This commit is contained in:
Родитель
371985eba8
Коммит
34eceab05c
|
@ -55,25 +55,20 @@ NS_IMETHODIMP_(nsrefcnt) nsPrintProgress::AddRef(void)
|
|||
NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt");
|
||||
nsrefcnt count;
|
||||
count = PR_AtomicIncrement((PRInt32*)&mRefCnt);
|
||||
//NS_LOG_ADDREF(this, count, #_class, sizeof(*this));
|
||||
//NS_LOG_ADDREF(this, count, "nsPrintProgress", sizeof(*this));
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this macro to implement the Release method for a given <i>_class</i>
|
||||
* @param _class The name of the class implementing the method
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt) nsPrintProgress::Release(void)
|
||||
{
|
||||
nsrefcnt count;
|
||||
NS_PRECONDITION(0 != mRefCnt, "dup release");
|
||||
count = PR_AtomicDecrement((PRInt32 *)&mRefCnt);
|
||||
//NS_LOG_RELEASE(this, count, #_class);
|
||||
//NS_LOG_RELEASE(this, count, "nsPrintProgress");
|
||||
if (0 == count) {
|
||||
mRefCnt = 1; /* stabilize */
|
||||
/* enable this to find non-threadsafe destructors: */
|
||||
/* NS_ASSERT_OWNINGTHREAD(_class); */
|
||||
/* NS_ASSERT_OWNINGTHREAD(nsPrintProgress); */
|
||||
NS_DELETEXPCOM(this);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -359,7 +359,7 @@ NS_IMETHODIMP_(nsrefcnt)
|
|||
XPCCallContext::Release(void)
|
||||
{
|
||||
NS_PRECONDITION(0 != mRefCnt, "dup release");
|
||||
NS_ASSERT_OWNINGTHREAD(_class);
|
||||
NS_ASSERT_OWNINGTHREAD(XPCCallContext);
|
||||
--mRefCnt;
|
||||
NS_LOG_RELEASE(this, mRefCnt, "XPCCallContext");
|
||||
// no delete this!
|
||||
|
|
|
@ -194,7 +194,7 @@ nsrefcnt nsJAR::Release(void)
|
|||
if (0 == count) {
|
||||
mRefCnt = 1; /* stabilize */
|
||||
/* enable this to find non-threadsafe destructors: */
|
||||
/* NS_ASSERT_OWNINGTHREAD(_class); */
|
||||
/* NS_ASSERT_OWNINGTHREAD(nsJAR); */
|
||||
NS_DELETEXPCOM(this);
|
||||
return 0;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче