Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 07995a4

Browse files
committed
Bug 1524688: Part 59 - Convert DevToolsStartup to static registration. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D18469 --HG-- rename : devtools/startup/aboutdebugging-new-registration.js => devtools/startup/AboutDebuggingNewRegistration.jsm rename : devtools/startup/aboutdebugging-registration.js => devtools/startup/AboutDebuggingRegistration.jsm rename : devtools/startup/aboutdevtoolstoolbox-registration.js => devtools/startup/AboutDevToolsToolboxRegistration.jsm rename : devtools/startup/devtools-startup.js => devtools/startup/DevToolsStartup.jsm rename : devtools/startup/aboutdevtools/aboutdevtools-registration.js => devtools/startup/aboutdevtools/AboutDevToolsRegistration.jsm extra : rebase_source : f41829e4c472309121cefcc35e414d2181ddffef
1 parent 4d9897c commit 07995a4

15 files changed

Lines changed: 74 additions & 53 deletions

browser/installer/package-manifest.in

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,6 @@
161161

162162
; JavaScript components
163163
@RESPATH@/browser/components/BrowserComponents.manifest
164-
@RESPATH@/browser/components/devtools-startup.manifest
165-
@RESPATH@/browser/components/devtools-startup.js
166-
@RESPATH@/browser/components/aboutdebugging-registration.js
167-
@RESPATH@/browser/components/aboutdebugging.manifest
168-
#ifdef NIGHTLY_BUILD
169-
@RESPATH@/browser/components/aboutdebugging-new-registration.js
170-
@RESPATH@/browser/components/aboutdebugging-new.manifest
171-
#endif
172-
@RESPATH@/browser/components/aboutdevtools-registration.js
173-
@RESPATH@/browser/components/aboutdevtools.manifest
174-
@RESPATH@/browser/components/aboutdevtoolstoolbox-registration.js
175-
@RESPATH@/browser/components/aboutdevtoolstoolbox.manifest
176164
@RESPATH@/browser/components/aboutNewTabService.js
177165
@RESPATH@/browser/components/NewTabComponents.manifest
178166
@RESPATH@/browser/components/EnterprisePolicies.js

devtools/startup/aboutdebugging-new-registration.js renamed to devtools/startup/AboutDebuggingNewRegistration.jsm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// open the new about:debugging when going to about:debugging-new, without having to flip
99
// the preference. This allows running both versions of about:debugging side by side to
1010
// compare them.
11-
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
1211
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
1312

1413
const { nsIAboutModule } = Ci;
@@ -38,6 +37,4 @@ AboutDebuggingNew.prototype = {
3837
},
3938
};
4039

41-
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
42-
AboutDebuggingNew,
43-
]);
40+
var EXPORTED_SYMBOLS = ["AboutDebuggingNew"];

devtools/startup/aboutdebugging-registration.js renamed to devtools/startup/AboutDebuggingRegistration.jsm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// workers and tabs by launching a dedicated DevTools toolbox for the selected target.
99
// If DevTools are not installed, this about page will display a shim landing page
1010
// encouraging the user to download and install DevTools.
11-
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
1211
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
1312

1413
const { nsIAboutModule } = Ci;
@@ -40,6 +39,4 @@ AboutDebugging.prototype = {
4039
},
4140
};
4241

43-
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
44-
AboutDebugging,
45-
]);
42+
var EXPORTED_SYMBOLS = ["AboutDebugging"];

devtools/startup/aboutdevtoolstoolbox-registration.js renamed to devtools/startup/AboutDevToolsToolboxRegistration.jsm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// Register about:devtools-toolbox which allows to open a devtools toolbox
88
// in a Firefox tab or a custom html iframe in browser.html
99

10-
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
1110
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
1211

1312
const { nsIAboutModule } = Ci;
@@ -35,6 +34,4 @@ AboutDevtoolsToolbox.prototype = {
3534
},
3635
};
3736

38-
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
39-
AboutDevtoolsToolbox,
40-
]);
37+
var EXPORTED_SYMBOLS = ["AboutDevtoolsToolbox"];
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,5 +1007,4 @@ const JsonView = {
10071007
},
10081008
};
10091009

1010-
this.NSGetFactory = XPCOMUtils.generateNSGetFactory(
1011-
[DevToolsStartup]);
1010+
var EXPORTED_SYMBOLS = ["DevToolsStartup"];

devtools/startup/aboutdebugging-new.manifest

Lines changed: 0 additions & 2 deletions
This file was deleted.

devtools/startup/aboutdebugging.manifest

Lines changed: 0 additions & 2 deletions
This file was deleted.

devtools/startup/aboutdevtools/aboutdevtools-registration.js renamed to devtools/startup/aboutdevtools/AboutDevToolsRegistration.jsm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
// Register the about:devtools URL, that is opened whenever a user attempts to open
88
// DevTools for the first time.
9-
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
109
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
1110

1211
const { nsIAboutModule } = Ci;
@@ -35,6 +34,4 @@ AboutDevtools.prototype = {
3534
},
3635
};
3736

38-
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
39-
AboutDevtools,
40-
]);
37+
var EXPORTED_SYMBOLS = ["AboutDevtools"];

devtools/startup/aboutdevtools/aboutdevtools.manifest

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2+
# vim: set filetype=python:
3+
# This Source Code Form is subject to the terms of the Mozilla Public
4+
# License, v. 2.0. If a copy of the MPL was not distributed with this
5+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
7+
Classes = [
8+
{
9+
'cid': '{3a16d383-92bd-4c24-ac10-0e2bd66883ab}',
10+
'contract_ids': ['@mozilla.org/network/protocol/about;1?what=devtools'],
11+
'jsm': 'resource:///modules/AboutDevToolsRegistration.jsm',
12+
'constructor': 'AboutDevtools',
13+
},
14+
]

0 commit comments

Comments
 (0)