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
This commit is contained in:
Kris Maglione 2019-01-30 11:53:03 -08:00
Родитель 4d9897ca16
Коммит 07995a4aaa
15 изменённых файлов: 74 добавлений и 53 удалений

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

@ -161,18 +161,6 @@
; JavaScript components
@RESPATH@/browser/components/BrowserComponents.manifest
@RESPATH@/browser/components/devtools-startup.manifest
@RESPATH@/browser/components/devtools-startup.js
@RESPATH@/browser/components/aboutdebugging-registration.js
@RESPATH@/browser/components/aboutdebugging.manifest
#ifdef NIGHTLY_BUILD
@RESPATH@/browser/components/aboutdebugging-new-registration.js
@RESPATH@/browser/components/aboutdebugging-new.manifest
#endif
@RESPATH@/browser/components/aboutdevtools-registration.js
@RESPATH@/browser/components/aboutdevtools.manifest
@RESPATH@/browser/components/aboutdevtoolstoolbox-registration.js
@RESPATH@/browser/components/aboutdevtoolstoolbox.manifest
@RESPATH@/browser/components/aboutNewTabService.js
@RESPATH@/browser/components/NewTabComponents.manifest
@RESPATH@/browser/components/EnterprisePolicies.js

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

@ -8,7 +8,6 @@
// open the new about:debugging when going to about:debugging-new, without having to flip
// the preference. This allows running both versions of about:debugging side by side to
// compare them.
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { nsIAboutModule } = Ci;
@ -38,6 +37,4 @@ AboutDebuggingNew.prototype = {
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
AboutDebuggingNew,
]);
var EXPORTED_SYMBOLS = ["AboutDebuggingNew"];

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

@ -8,7 +8,6 @@
// workers and tabs by launching a dedicated DevTools toolbox for the selected target.
// If DevTools are not installed, this about page will display a shim landing page
// encouraging the user to download and install DevTools.
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { nsIAboutModule } = Ci;
@ -40,6 +39,4 @@ AboutDebugging.prototype = {
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
AboutDebugging,
]);
var EXPORTED_SYMBOLS = ["AboutDebugging"];

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

@ -7,7 +7,6 @@
// Register about:devtools-toolbox which allows to open a devtools toolbox
// in a Firefox tab or a custom html iframe in browser.html
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { nsIAboutModule } = Ci;
@ -35,6 +34,4 @@ AboutDevtoolsToolbox.prototype = {
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
AboutDevtoolsToolbox,
]);
var EXPORTED_SYMBOLS = ["AboutDevtoolsToolbox"];

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

@ -1007,5 +1007,4 @@ const JsonView = {
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory(
[DevToolsStartup]);
var EXPORTED_SYMBOLS = ["DevToolsStartup"];

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

@ -1,2 +0,0 @@
component {610e4e26-26bd-4a7d-aebc-69211d5a3be0} aboutdebugging-new-registration.js
contract @mozilla.org/network/protocol/about;1?what=debugging-new {610e4e26-26bd-4a7d-aebc-69211d5a3be0}

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

@ -1,2 +0,0 @@
component {1060afaf-dc9e-43da-8646-23a2faf48493} aboutdebugging-registration.js
contract @mozilla.org/network/protocol/about;1?what=debugging {1060afaf-dc9e-43da-8646-23a2faf48493}

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

@ -6,7 +6,6 @@
// Register the about:devtools URL, that is opened whenever a user attempts to open
// DevTools for the first time.
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { nsIAboutModule } = Ci;
@ -35,6 +34,4 @@ AboutDevtools.prototype = {
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
AboutDevtools,
]);
var EXPORTED_SYMBOLS = ["AboutDevtools"];

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

@ -1,2 +0,0 @@
component {3a16d383-92bd-4c24-ac10-0e2bd66883ab} aboutdevtools-registration.js
contract @mozilla.org/network/protocol/about;1?what=devtools {3a16d383-92bd-4c24-ac10-0e2bd66883ab}

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

@ -0,0 +1,14 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
Classes = [
{
'cid': '{3a16d383-92bd-4c24-ac10-0e2bd66883ab}',
'contract_ids': ['@mozilla.org/network/protocol/about;1?what=devtools'],
'jsm': 'resource:///modules/AboutDevToolsRegistration.jsm',
'constructor': 'AboutDevtools',
},
]

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

@ -4,9 +4,12 @@
# 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/.
EXTRA_COMPONENTS += [
'aboutdevtools-registration.js',
'aboutdevtools.manifest',
EXTRA_JS_MODULES += [
'AboutDevToolsRegistration.jsm',
]
XPCOM_MANIFESTS += [
'components.conf',
]
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']

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

@ -1,2 +0,0 @@
component {11342911-3135-45a8-8d71-737a2b0ad469} aboutdevtoolstoolbox-registration.js
contract @mozilla.org/network/protocol/about;1?what=devtools-toolbox {11342911-3135-45a8-8d71-737a2b0ad469}

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

@ -0,0 +1,40 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
Classes = []
if buildconfig.substs['MOZ_DEVTOOLS'] == 'all':
Classes += [
{
'cid': '{9e9a9283-0ce9-4e4a-8f1c-ba129a032c32}',
'contract_ids': ['@mozilla.org/devtools/startup-clh;1'],
'jsm': 'resource:///modules/DevToolsStartup.jsm',
'constructor': 'DevToolsStartup',
'categories': {'command-line-handler': 'm-devtools'},
},
{
'cid': '{1060afaf-dc9e-43da-8646-23a2faf48493}',
'contract_ids': ['@mozilla.org/network/protocol/about;1?what=debugging'],
'jsm': 'resource:///modules/AboutDebuggingRegistration.jsm',
'constructor': 'AboutDebugging',
},
{
'cid': '{11342911-3135-45a8-8d71-737a2b0ad469}',
'contract_ids': ['@mozilla.org/network/protocol/about;1?what=devtools-toolbox'],
'jsm': 'resource:///modules/AboutDevToolsToolboxRegistration.jsm',
'constructor': 'AboutDevtoolsToolbox',
},
]
if defined('NIGHTLY_BUILD'):
Classes += [
{
'cid': '{610e4e26-26bd-4a7d-aebc-69211d5a3be0}',
'contract_ids': ['@mozilla.org/network/protocol/about;1?what=debugging-new'],
'jsm': 'resource:///modules/AboutDebuggingNewRegistration.jsm',
'constructor': 'AboutDebuggingNew',
},
]

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

@ -1,3 +0,0 @@
component {9e9a9283-0ce9-4e4a-8f1c-ba129a032c32} devtools-startup.js
contract @mozilla.org/devtools/startup-clh;1 {9e9a9283-0ce9-4e4a-8f1c-ba129a032c32}
category command-line-handler m-devtools @mozilla.org/devtools/startup-clh;1

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

@ -12,13 +12,10 @@ DIRS += [
# Register the startup components only for 'all' builds.
if CONFIG['MOZ_DEVTOOLS'] == 'all':
EXTRA_COMPONENTS += [
'aboutdebugging-registration.js',
'aboutdebugging.manifest',
'aboutdevtoolstoolbox-registration.js',
'aboutdevtoolstoolbox.manifest',
'devtools-startup.js',
'devtools-startup.manifest',
EXTRA_JS_MODULES += [
'AboutDebuggingRegistration.jsm',
'AboutDevToolsToolboxRegistration.jsm',
'DevToolsStartup.jsm',
]
DIRS += [
@ -28,10 +25,13 @@ if CONFIG['MOZ_DEVTOOLS'] == 'all':
if CONFIG['NIGHTLY_BUILD']:
EXTRA_COMPONENTS += [
'aboutdebugging-new-registration.js',
'aboutdebugging-new.manifest',
'AboutDebuggingNewRegistration.jsm',
]
XPCOM_MANIFESTS += [
'components.conf',
]
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
if CONFIG['MOZ_BUILD_APP'] != 'mobile/android':