Bug 1875100 - Trivial lint fix.

This commit is contained in:
Emilio Cobos Álvarez 2024-02-07 12:46:25 +01:00
parent a9f16b17b0
commit 13533153ca

View File

@ -46,7 +46,6 @@ function mediaSuspendedStateShouldEqualTo(expected) {
function setDocShellActive(isActive) {
const win = SpecialPowers.wrap(window);
const docShell = win.docShell;
const browsingContext = win.browsingContext;
let p = new Promise(r => {
docShell.chromeEventHandler.addEventListener("MozMediaSuspendChanged",
() => {
@ -56,13 +55,13 @@ function setDocShellActive(isActive) {
);
});
SpecialPowers.spawnChrome([isActive], isActive => {
SpecialPowers.spawnChrome([isActive], active => {
// This flag is used to prevent media from playing when docShell is
// inactive. After updating `docshell.isActive`, it would suspend/resume
// media and we // wait suspending/resuming finishing by listening to
// `MozMediaSuspendChanged`.
this.browsingContext.top.suspendMediaWhenInactive = true;
this.browsingContext.top.isActive = isActive;
this.browsingContext.top.isActive = active;
});
return p;