зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1588002 - Make sure to remove every nsIDOMMozWakeLockListener added by browser_media_wakelock.js even if a notification is not seen. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D48931 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
25d20e8373
Коммит
315a7c522c
|
@ -156,9 +156,7 @@ support-files =
|
|||
file_videoWithoutAudioTrack.html
|
||||
gizmo.mp4
|
||||
gizmo-noaudio.webm
|
||||
skip-if =
|
||||
(os == "win" && processor == "aarch64") || # aarch64 due to 1536573
|
||||
(fission && debug) # Leaks the world under Fission.
|
||||
skip-if = (os == "win" && processor == "aarch64") # aarch64 due to 1536573
|
||||
[browser_mute.js]
|
||||
tags = audiochannel
|
||||
skip-if = (os == "win" && processor == "aarch64") # aarch64 due to 1536573
|
||||
|
|
|
@ -35,10 +35,9 @@ function wakeLockObserved(observeTopic, checkFn) {
|
|||
|
||||
function getWakeLockState(topic, needLock, isTabInForeground) {
|
||||
const tabState = isTabInForeground ? "foreground" : "background";
|
||||
const promise = wakeLockObserved(
|
||||
topic,
|
||||
state => state == `locked-${tabState}`
|
||||
);
|
||||
const promise = needLock
|
||||
? wakeLockObserved(topic, state => state == `locked-${tabState}`)
|
||||
: null;
|
||||
return {
|
||||
check: async () => {
|
||||
if (needLock) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче