Tweaked refcnt munging to better support refcnt tracking
git-svn-id: svn://10.0.0.236/trunk@49904 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -264,10 +264,9 @@ void nsWidget::OnDestroy()
|
||||
// dispatching of the event may cause the reference count to drop
|
||||
// to 0 and result in this object being destroyed. To avoid that,
|
||||
// add a reference and then release it after dispatching the event
|
||||
nsrefcnt old = mRefCnt;
|
||||
mRefCnt = 99;
|
||||
mRefCnt += 100;
|
||||
DispatchStandardEvent(NS_DESTROY);
|
||||
mRefCnt = old;
|
||||
mRefCnt -= 100;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user