Bug 1839518 - Convert LayoutDebugChild to an ES module. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D181579
This commit is contained in:
Mark Banner 2023-06-21 09:49:06 +00:00
parent 17845fedb5
commit f63f188596
3 changed files with 3 additions and 6 deletions

View File

@ -2,14 +2,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 = ["LayoutDebugChild"];
const NS_LAYOUT_DEBUGGINGTOOLS_CONTRACTID =
"@mozilla.org/layout-debug/layout-debuggingtools;1";
class LayoutDebugChild extends JSWindowActorChild {
export class LayoutDebugChild extends JSWindowActorChild {
receiveMessage(msg) {
if (!this._debuggingTools) {
this._debuggingTools = Cc[

View File

@ -10,4 +10,4 @@ XPCSHELL_TESTS_MANIFESTS += ["tests/unit/xpcshell.ini"]
BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.ini"]
FINAL_TARGET_FILES.actors += ["LayoutDebugChild.jsm"]
FINAL_TARGET_FILES.actors += ["LayoutDebugChild.sys.mjs"]

View File

@ -316,7 +316,7 @@ function OnLDBLoad() {
try {
ChromeUtils.registerWindowActor("LayoutDebug", {
child: {
moduleURI: "resource://gre/actors/LayoutDebugChild.jsm",
esModuleURI: "resource://gre/actors/LayoutDebugChild.sys.mjs",
},
allFrames: true,
});