From dae1f43af1ee264e1081ae3f26ea0009005d9bf5 Mon Sep 17 00:00:00 2001 From: "Jerry.Kirk%Nexwarecorp.com" Date: Thu, 2 Sep 1999 00:59:06 +0000 Subject: [PATCH] Make the Photon timer safer so it doesn't give an error if its destroyed before its used or multiple times. Also takes care of problem: "Assertion: "Time to next timeout func is null." (nsnull != sFunc) at file nsAppShell.cpp, line 117" as seen at the start of apprunner. git-svn-id: svn://10.0.0.236/trunk@45598 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/timer/src/photon/nsTimer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/widget/timer/src/photon/nsTimer.cpp b/mozilla/widget/timer/src/photon/nsTimer.cpp index 61682bb9724..28810ce883c 100644 --- a/mozilla/widget/timer/src/photon/nsTimer.cpp +++ b/mozilla/widget/timer/src/photon/nsTimer.cpp @@ -127,6 +127,7 @@ NS_METHOD TimerImpl::SetupTimer( PRUint32 aDelay ) return NS_ERROR_FAILURE; } + mTimerId = -1; err = timer_create( CLOCK_SOFTTIME, &mPulseMsg, &mTimerId ); if( err != 0 ) { @@ -194,7 +195,7 @@ void TimerImpl::Cancel() return; } - mTimerId *= -1; // HACK for Debug + mTimerId = -1; // HACK for Debug } if( mInputId )