Bug 1820723 - do not create wakelock if XPCOM has started shutdown. r=media-playback-reviewers,jolin
Differential Revision: https://phabricator.services.mozilla.com/D172031
This commit is contained in:
@@ -4601,6 +4601,9 @@ void HTMLMediaElement::UpdateWakeLock() {
|
||||
}
|
||||
|
||||
void HTMLMediaElement::CreateAudioWakeLockIfNeeded() {
|
||||
if (AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownConfirmed)) {
|
||||
return;
|
||||
}
|
||||
if (!mWakeLock) {
|
||||
RefPtr<power::PowerManagerService> pmService =
|
||||
power::PowerManagerService::GetInstance();
|
||||
|
||||
Reference in New Issue
Block a user