Fix bugs 3653, 3652 and 3566. Leaking timers.
Thanks to Tomi Leppikangas <Tomi.Leppikangas@oulu.fi> for providing the fix and Bruce Mitchener <bruce@cybersight.com> for purifying it. git-svn-id: svn://10.0.0.236/trunk@24178 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c332730afc
commit
f4cf6c562b
@ -131,6 +131,7 @@ TimerImpl::Init(nsITimerCallback *aCallback,
|
||||
{
|
||||
//printf("TimerImpl::Init called with callback only for %p\n", this);
|
||||
mCallback = aCallback;
|
||||
NS_ADDREF(mCallback);
|
||||
// mRepeat = aRepeat;
|
||||
if ((aDelay > 10000) || (aDelay < 0)) {
|
||||
printf("Timer::Init() called with bogus value \"%d\"! Not enabling timer.\n",
|
||||
@ -149,7 +150,7 @@ TimerImpl::Init(PRUint32 aDelay)
|
||||
//printf("TimerImpl::Init called with delay %d only for %p\n", aDelay, this);
|
||||
|
||||
mDelay = aDelay;
|
||||
NS_ADDREF(this);
|
||||
// NS_ADDREF(this);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user