Bug 1174043 - Run DisableTimer if timer is not yet disabled. r=dglastonbury

This commit is contained in:
Morris Tseng 2015-07-07 23:43:00 +02:00
parent cb755f2a73
commit 6063c7d974

View File

@ -57,13 +57,12 @@ void
WebGLContextLossHandler::TimerCallback()
{
MOZ_ASSERT(NS_GetCurrentThread() == mThread);
MOZ_ASSERT(mIsTimerRunning);
mIsTimerRunning = false;
if (mIsDisabled)
return;
MOZ_ASSERT(mIsTimerRunning);
mIsTimerRunning = false;
// If we need to run the timer again, restart it immediately.
// Otherwise, the code we call into below might *also* try to
// restart it.
@ -100,7 +99,7 @@ WebGLContextLossHandler::RunTimer()
void
WebGLContextLossHandler::DisableTimer()
{
if (!mIsDisabled)
if (mIsDisabled)
return;
mIsDisabled = true;