commit 3ce9556dbe3fc124ade9c856c6ce68779f78ea3e
parent 6f3c962b15c3176b5b9c71d2dbd591dc7b2cda78
Author: Lorenz A <me@lorenzackermann.xyz>
Date: Thu, 11 Dec 2025 07:01:02 +0000
Bug 2004221 - [devtools] Turn devtools/startup/AboutDebuggingRegistration.sys.mjs into an ES class. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D275615
Diffstat:
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/devtools/startup/AboutDebuggingRegistration.sys.mjs b/devtools/startup/AboutDebuggingRegistration.sys.mjs
@@ -2,19 +2,18 @@
* 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/. */
-// Register the about:debugging URL, that allows to debug tabs, extensions, workers on
-// the current instance of Firefox or on a remote Firefox.
-
const { nsIAboutModule } = Ci;
-export function AboutDebugging() {}
-
-AboutDebugging.prototype = {
- classDescription: "about:debugging",
- classID: Components.ID("1060afaf-dc9e-43da-8646-23a2faf48493"),
- contractID: "@mozilla.org/network/protocol/about;1?what=debugging",
+/**
+ * Register the about:debugging URL, that allows to debug tabs, extensions, workers on
+ * the current instance of Firefox or on a remote Firefox.
+ */
+export class AboutDebugging {
+ classDescription = "about:debugging";
+ classID = Components.ID("1060afaf-dc9e-43da-8646-23a2faf48493");
+ contractID = "@mozilla.org/network/protocol/about;1?what=debugging";
- QueryInterface: ChromeUtils.generateQI([nsIAboutModule]),
+ QueryInterface = ChromeUtils.generateQI([nsIAboutModule]);
newChannel(_, loadInfo) {
const chan = Services.io.newChannelFromURIWithLoadInfo(
@@ -23,15 +22,15 @@ AboutDebugging.prototype = {
);
chan.owner = Services.scriptSecurityManager.getSystemPrincipal();
return chan;
- },
+ }
getURIFlags() {
return nsIAboutModule.ALLOW_SCRIPT | nsIAboutModule.IS_SECURE_CHROME_UI;
- },
+ }
getChromeURI(_uri) {
return Services.io.newURI(
"chrome://devtools/content/aboutdebugging/index.html"
);
- },
-};
+ }
+}