mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1875100 - Trivial lint fix.
This commit is contained in:
parent
a9f16b17b0
commit
13533153ca
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user