mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-30 01:59:29 +00:00
Bug 877638 - Crash in WakeLockBoolWrapper::UpdateWakeLock when running crashtests. r=ehsan
This commit is contained in:
parent
d23366fba0
commit
af98aa02ae
@ -2153,8 +2153,10 @@ HTMLMediaElement::WakeLockBoolWrapper::UpdateWakeLock()
|
||||
// grace period.
|
||||
int timeout = Preferences::GetInt("media.wakelock_timeout", 2000);
|
||||
mTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
mTimer->InitWithFuncCallback(TimerCallback, this, timeout,
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
if (mTimer) {
|
||||
mTimer->InitWithFuncCallback(TimerCallback, this, timeout,
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user