зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1824494 - Convert browser/actors/WebRTC* JSMs to ESMs. r=kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D175182
This commit is contained in:
Родитель
40532a5a80
Коммит
24d1599358
|
@ -4,11 +4,9 @@
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"WebRTCChild",
|
||||
"resource:///actors/WebRTCChild.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
WebRTCChild: "resource:///actors/WebRTCChild.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
|
|
|
@ -2,16 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["WebRTCChild"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const lazy = {};
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
lazy,
|
||||
|
@ -74,7 +67,7 @@ const GlobalMuteListener = {
|
|||
},
|
||||
};
|
||||
|
||||
class WebRTCChild extends JSWindowActorChild {
|
||||
export class WebRTCChild extends JSWindowActorChild {
|
||||
actorCreated() {
|
||||
// The user might request that DOM notifications be silenced
|
||||
// when sharing the screen. There doesn't seem to be a great
|
|
@ -2,13 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["WebRTCParent"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
@ -33,7 +27,7 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"nsIOSPermissionRequest"
|
||||
);
|
||||
|
||||
class WebRTCParent extends JSWindowActorParent {
|
||||
export class WebRTCParent extends JSWindowActorParent {
|
||||
didDestroy() {
|
||||
// Media stream tracks end on unload, so call stopRecording() on them early
|
||||
// *before* we go away, to ensure we're working with the right principal.
|
|
@ -28,7 +28,7 @@ with Files("PluginChild.sys.mjs"):
|
|||
with Files("ScreenshotsComponentChild.sys.mjs"):
|
||||
BUG_COMPONENT = ("Firefox", "Screenshots")
|
||||
|
||||
with Files("WebRTCChild.jsm"):
|
||||
with Files("WebRTCChild.sys.mjs"):
|
||||
BUG_COMPONENT = ("Firefox", "Site Permissions")
|
||||
|
||||
FINAL_TARGET_FILES.actors += [
|
||||
|
@ -83,8 +83,8 @@ FINAL_TARGET_FILES.actors += [
|
|||
"SearchSERPTelemetryChild.sys.mjs",
|
||||
"SearchSERPTelemetryParent.sys.mjs",
|
||||
"SwitchDocumentDirectionChild.sys.mjs",
|
||||
"WebRTCChild.jsm",
|
||||
"WebRTCParent.jsm",
|
||||
"WebRTCChild.sys.mjs",
|
||||
"WebRTCParent.sys.mjs",
|
||||
]
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += [
|
||||
|
|
|
@ -60,8 +60,8 @@ async function simulateAudioOutputRequest(options) {
|
|||
isSecure: true,
|
||||
isHandlingUserInput: true,
|
||||
};
|
||||
const { WebRTCChild } = SpecialPowers.ChromeUtils.import(
|
||||
"resource:///actors/WebRTCChild.jsm"
|
||||
const { WebRTCChild } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource:///actors/WebRTCChild.sys.mjs"
|
||||
);
|
||||
WebRTCChild.observe(req, "getUserMedia:request");
|
||||
}
|
||||
|
|
|
@ -809,10 +809,10 @@ let JSWINDOWACTORS = {
|
|||
|
||||
WebRTC: {
|
||||
parent: {
|
||||
moduleURI: "resource:///actors/WebRTCParent.jsm",
|
||||
esModuleURI: "resource:///actors/WebRTCParent.sys.mjs",
|
||||
},
|
||||
child: {
|
||||
moduleURI: "resource:///actors/WebRTCChild.jsm",
|
||||
esModuleURI: "resource:///actors/WebRTCChild.sys.mjs",
|
||||
},
|
||||
|
||||
allFrames: true,
|
||||
|
|
Загрузка…
Ссылка в новой задаче