Bug 1790227 -Coverted DecoderDoctor JSM modules to ESM modules. r=NeilDeakin,media-playback-reviewers,chunmin.

Differential Revision: https://phabricator.services.mozilla.com/D158406
This commit is contained in:
Evan 2022-10-17 17:22:38 +00:00
Родитель 090cb0c41b
Коммит 05f00ddaec
5 изменённых файлов: 9 добавлений и 19 удалений

Просмотреть файл

@ -4,11 +4,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 = ["DecoderDoctorChild"];
class DecoderDoctorChild extends JSWindowActorChild {
export class DecoderDoctorChild extends JSWindowActorChild {
// Observes 'decoder-doctor-notification'. This actor handles most such notifications, but does not deal with notifications with the 'cannot-play' type, which is handled
// @param aSubject the nsPIDOMWindowInner associated with the notification.
// @param aTopic should be "decoder-doctor-notification".

Просмотреть файл

@ -4,16 +4,10 @@
* 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 = ["DecoderDoctorParent"];
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
@ -36,7 +30,7 @@ function LOG_DD(message) {
}
}
class DecoderDoctorParent extends JSWindowActorParent {
export class DecoderDoctorParent extends JSWindowActorParent {
getLabelForNotificationBox({ type, decoderDoctorReportId }) {
if (type == "platform-decoder-not-found") {
if (decoderDoctorReportId == "MediaWMFNeeded") {

Просмотреть файл

@ -57,8 +57,8 @@ FINAL_TARGET_FILES.actors += [
"ContentSearchParent.sys.mjs",
"ContextMenuChild.jsm",
"ContextMenuParent.jsm",
"DecoderDoctorChild.jsm",
"DecoderDoctorParent.jsm",
"DecoderDoctorChild.sys.mjs",
"DecoderDoctorParent.sys.mjs",
"DOMFullscreenChild.sys.mjs",
"DOMFullscreenParent.sys.mjs",
"EncryptedMediaChild.sys.mjs",

Просмотреть файл

@ -487,11 +487,11 @@ let JSWINDOWACTORS = {
DecoderDoctor: {
parent: {
moduleURI: "resource:///actors/DecoderDoctorParent.jsm",
esModuleURI: "resource:///actors/DecoderDoctorParent.sys.mjs",
},
child: {
moduleURI: "resource:///actors/DecoderDoctorChild.jsm",
esModuleURI: "resource:///actors/DecoderDoctorChild.sys.mjs",
observers: ["decoder-doctor-notification"],
},

Просмотреть файл

@ -242,8 +242,8 @@ enum class ReportParam : uint8_t {
};
struct NotificationAndReportStringId {
// Notification type, handled by DecoderDoctorChild.jsm and
// DecoderDoctorParent.jsm.
// Notification type, handled by DecoderDoctorChild.sys.mjs and
// DecoderDoctorParent.sys.mjs.
dom::DecoderDoctorNotificationType mNotificationType;
// Console message id. Key in dom/locales/.../chrome/dom/dom.properties.
const char* mReportStringId;