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
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user