Bug 1789201 - [devtools] Expose Services as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,julienw,AlexandruIonescu

This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests

Differential Revision: https://phabricator.services.mozilla.com/D156401
This commit is contained in:
Alexandre Poirot 2022-09-09 07:22:51 +00:00
Родитель 5960d8f2cc
Коммит 7f9229d43d
276 изменённых файлов: 18 добавлений и 367 удалений

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const { bindActionCreators } = require("devtools/client/shared/vendor/redux");
const { createFactory } = require("devtools/client/shared/vendor/react");
const {

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

@ -8,7 +8,6 @@ const { AddonManager } = require("resource://gre/modules/AddonManager.jsm");
const {
remoteClientManager,
} = require("devtools/client/shared/remote-debugging/remote-client-manager");
const Services = require("Services");
const { l10n } = require("devtools/client/aboutdebugging/src/modules/l10n");

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const Actions = require("devtools/client/aboutdebugging/src/actions/index");
const {

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const {
applyMiddleware,
createStore,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { l10n } = require("devtools/client/aboutdebugging/src/modules/l10n");
const {

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const PREF_PREFIX = "devtools.aboutdebugging.collapsibilities.";
const {
DEBUG_TARGET_PANE,

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

@ -10,8 +10,6 @@ const {
RUNTIMES,
} = require("devtools/client/aboutdebugging/src/constants");
const Services = require("Services");
// Process target debugging is disabled by default.
function isProcessDebuggingSupported() {
return Services.prefs.getBoolPref(

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

@ -5,7 +5,6 @@
"use strict";
const { Cc, Ci } = require("chrome");
const Services = require("Services");
loader.lazyImporter(
this,
"AddonManager",

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const NETWORK_LOCATIONS_PREF = "devtools.aboutdebugging.network-locations";
/**

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

@ -3,8 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Services = require("Services");
const {
ENABLE,
RESET,

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

@ -3,8 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Services = require("Services");
const EventEmitter = require("devtools/shared/event-emitter");
const Telemetry = require("devtools/client/shared/telemetry");

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const {
AUDIT,
ENABLE,

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

@ -23,7 +23,6 @@ Test that LearnMoreLink parses and renders correctly text with learn more links.
window.onload = async function() {
try {
const { gDevTools } = require("devtools/client/framework/devtools");
const Services = browserRequire("Services");
const ReactDOM = browserRequire("devtools/client/shared/vendor/react-dom");
const { createFactory } = browserRequire("devtools/client/shared/vendor/react");
const { Simulate } =

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

@ -23,7 +23,6 @@ Test that openLink function is called if accessible object property is rendered
window.onload = async function() {
try {
const { gDevTools } = require("devtools/client/framework/devtools");
const Services = browserRequire("Services");
const ReactDOM = browserRequire("devtools/client/shared/vendor/react-dom");
const { createFactory, createElement } =
browserRequire("devtools/client/shared/vendor/react");

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

@ -23,7 +23,6 @@ Test that openLink function is called if accessible object property is rendered
window.onload = async function() {
try {
const { gDevTools } = require("devtools/client/framework/devtools");
const Services = browserRequire("Services");
const ReactDOM = browserRequire("devtools/client/shared/vendor/react-dom");
const { createFactory, createElement } =
browserRequire("devtools/client/shared/vendor/react");

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
// keyword to use in telemetry, as `reason` parameter
const REASON = "application";

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

@ -13,7 +13,6 @@ module.exports = {
"prop-types": "devtools/client/shared/vendor/react-prop-types",
"devtools-modules/src/menu": "devtools/client/framework/menu",
"devtools-modules/src/menu/menu-item": "devtools/client/framework/menu-item",
"devtools-services": "Services",
"wasmparser/dist/cjs/WasmParser": "devtools/client/shared/vendor/WasmParser",
"wasmparser/dist/cjs/WasmDis": "devtools/client/shared/vendor/WasmDis",
};

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

@ -24,7 +24,6 @@ const KeyShortcuts = require("devtools/client/shared/key-shortcuts");
const SplitBox = require("devtools/client/shared/components/splitter/SplitBox");
const AppErrorBoundary = require("devtools/client/shared/components/AppErrorBoundary");
import Services from "devtools-services";
const shortcuts = new KeyShortcuts({ window });
const { appinfo } = Services;

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

@ -83,7 +83,6 @@ import {
} from "../../utils/editor";
import { resizeToggleButton, resizeBreakpointGutter } from "../../utils/ui";
import Services from "devtools-services";
const { debounce } = require("devtools/shared/debounce");

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

@ -22,13 +22,11 @@ import { debugBtn } from "../shared/Button/CommandBarButton";
import AccessibleImage from "../shared/AccessibleImage";
import "./CommandBar.css";
import { appinfo } from "devtools-services";
const MenuButton = require("devtools/client/shared/components/menu/MenuButton");
const MenuItem = require("devtools/client/shared/components/menu/MenuItem");
const MenuList = require("devtools/client/shared/components/menu/MenuList");
const isMacOS = appinfo.OS === "Darwin";
const isMacOS = Services.appinfo.OS === "Darwin";
// NOTE: the "resume" command will call either the resume or breakOnNext action
// depending on whether or not the debugger is paused or running
@ -57,7 +55,7 @@ const KEYS = {
};
function getKey(action) {
return getKeyForOS(appinfo.OS, action);
return getKeyForOS(Services.appinfo.OS, action);
}
function getKeyForOS(os, action) {

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

@ -5,7 +5,6 @@
const { PrefsHelper } = require("devtools/client/shared/prefs");
import { isNode } from "./environment";
import Services from "devtools-services";
// Schema version to bump when the async store format has changed incompatibly
// and old stores should be cleared.

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

@ -6,10 +6,8 @@
* Utils for keyboard command strings
* @module utils/text
*/
import Services from "devtools-services";
const { appinfo } = Services;
const isMacOS = appinfo.OS === "Darwin";
const isMacOS = Services.appinfo.OS === "Darwin";
/**
* Formats key for use in tooltips

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const osString = Services.appinfo.OS;
// Panels

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
loader.lazyRequireGetter(
this,
"HTMLTooltip",

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

@ -46,8 +46,6 @@ XPCOMUtils.defineLazyServiceGetters(lazy, {
const Telemetry = require("devtools/client/shared/telemetry");
const EventEmitter = require("devtools/shared/event-emitter");
const Services = require("Services");
const env = Cc["@mozilla.org/process/environment;1"].getService(
Ci.nsIEnvironment
);

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

@ -13,7 +13,6 @@ loader.require("devtools/client/framework/devtools-browser");
var { gDevTools } = require("devtools/client/framework/devtools");
var { Toolbox } = require("devtools/client/framework/toolbox");
var Services = require("Services");
var { DevToolsClient } = require("devtools/client/devtools-client");
var { PrefsHelper } = require("devtools/client/shared/prefs");
const KeyShortcuts = require("devtools/client/shared/key-shortcuts");

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

@ -3,8 +3,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Services = require("Services");
const {
PureComponent,
createFactory,

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

@ -3,7 +3,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Services = require("Services");
const { PureComponent } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");

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

@ -12,7 +12,6 @@
* browser window is ready (i.e. fired browser-delayed-startup-finished event)
**/
const Services = require("Services");
const ChromeUtils = require("ChromeUtils");
const lazy = {};

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

@ -5,7 +5,6 @@
"use strict";
const { Cu } = require("chrome");
const Services = require("Services");
const ChromeUtils = require("ChromeUtils");
const {

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

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Services = require("Services");
const SOURCE_MAP_PREF = "devtools.source-map.client-service.enabled";
/**

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { LocalizationHelper } = require("devtools/shared/l10n");
const L10N = new LocalizationHelper(
"devtools/client/locales/toolbox.properties"

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

@ -5,7 +5,6 @@
"use strict";
const EventEmitter = require("devtools/shared/event-emitter");
const Services = require("Services");
loader.lazyRequireGetter(
this,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { gDevTools } = require("devtools/client/framework/devtools");
const { LocalizationHelper } = require("devtools/shared/l10n");

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

@ -6,7 +6,6 @@
const { AddonManager } = require("resource://gre/modules/AddonManager.jsm");
const { gDevTools } = require("devtools/client/framework/devtools");
const Services = require("Services");
const Telemetry = require("devtools/client/shared/telemetry");
const TABS_REORDERED_SCALAR = "devtools.toolbox.tabs_reordered";
const PREFERENCE_NAME = "devtools.toolbox.tabsOrder";

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

@ -27,7 +27,6 @@ var { Ci, Cc } = require("chrome");
const { debounce } = require("devtools/shared/debounce");
const { throttle } = require("devtools/shared/throttle");
const { safeAsyncMethod } = require("devtools/shared/async-utils");
var Services = require("Services");
var ChromeUtils = require("ChromeUtils");
var { gDevTools } = require("devtools/client/framework/devtools");
var EventEmitter = require("devtools/shared/event-emitter");

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

@ -16,7 +16,6 @@ const {
simulatorSpec,
} = require("devtools/shared/specs/accessibility");
const events = require("devtools/shared/event-emitter");
const Services = require("Services");
const BROWSER_TOOLBOX_FISSION_ENABLED = Services.prefs.getBoolPref(
"devtools.browsertoolbox.fission",
false

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

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Services = require("Services");
const {
processDescriptorSpec,
} = require("devtools/shared/specs/descriptors/process");

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

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Services = require("Services");
const { tabDescriptorSpec } = require("devtools/shared/specs/descriptors/tab");
const DESCRIPTOR_TYPES = require("devtools/client/fronts/descriptors/descriptor-types");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const Telemetry = require("devtools/client/shared/telemetry");
const {
FrontClassWithSpec,

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

@ -11,7 +11,6 @@ const {
} = require("devtools/shared/protocol.js");
const { nodeSpec, nodeListSpec } = require("devtools/shared/specs/node");
const { SimpleStringFront } = require("devtools/client/fronts/string");
const Services = require("Services");
loader.lazyRequireGetter(
this,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
FrontClassWithSpec,
types,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { PureComponent } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
createFactory,
PureComponent,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { PureComponent } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const flags = require("devtools/shared/flags");
const { throttle } = require("devtools/shared/throttle");

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const {
UPDATE_GRID_COLOR,
UPDATE_GRID_HIGHLIGHTED,

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const {
UPDATE_SHOW_GRID_AREAS,
UPDATE_SHOW_GRID_LINE_NUMBERS,

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

@ -8,7 +8,6 @@ const { KeyCodes } = require("devtools/client/shared/keycodes");
const EventEmitter = require("devtools/shared/event-emitter");
const AutocompletePopup = require("devtools/client/shared/autocomplete-popup");
const Services = require("Services");
// Maximum number of selector suggestions shown in the panel.
const MAX_SUGGESTIONS = 15;

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const EventEmitter = require("devtools/shared/event-emitter");
const flags = require("devtools/shared/flags");
const { executeSoon } = require("devtools/shared/DevToolsUtils");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
createFactory,
createRef,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { PSEUDO_CLASSES } = require("devtools/shared/css/constants");
const { LocalizationHelper } = require("devtools/shared/l10n");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const flags = require("devtools/shared/flags");
const nodeConstants = require("devtools/shared/dom-node-constants");
const nodeFilterConstants = require("devtools/shared/dom-node-filter-constants");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const MarkupContainer = require("devtools/client/inspector/markup/views/markup-container");
const ElementEditor = require("devtools/client/inspector/markup/views/element-editor");
const { ELEMENT_NODE } = require("devtools/shared/dom-node-constants");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const TextEditor = require("devtools/client/inspector/markup/views/text-editor");
const { truncateString } = require("devtools/shared/inspector/utils");
const {

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

@ -5,7 +5,6 @@
"use strict";
const Editor = require("devtools/client/shared/sourceeditor/editor");
const Services = require("Services");
const EventEmitter = require("devtools/shared/event-emitter");
/**

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const Rule = require("devtools/client/inspector/rules/models/rule");
const UserProperties = require("devtools/client/inspector/rules/models/user-properties");
const {

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

@ -9,7 +9,6 @@ const {
} = require("devtools/shared/constants");
const CssLogic = require("devtools/shared/inspector/css-logic");
const TextProperty = require("devtools/client/inspector/rules/models/text-property");
const Services = require("Services");
loader.lazyRequireGetter(
this,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const flags = require("devtools/shared/flags");
const { l10n } = require("devtools/shared/inspector/css-logic");
const {

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

@ -28,7 +28,6 @@ const {
SELECTOR_ELEMENT,
SELECTOR_PSEUDO_CLASS,
} = require("devtools/shared/css/parsing-utils");
const Services = require("Services");
const EventEmitter = require("devtools/shared/event-emitter");
const CssLogic = require("devtools/shared/inspector/css-logic");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { l10n } = require("devtools/shared/inspector/css-logic");
const {
InplaceEditor,

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const ChromeUtils = require("ChromeUtils");
const { RemoteSettings } = ChromeUtils.import(
"resource://services-settings/remote-settings.js"

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { safeAsyncMethod } = require("devtools/shared/async-utils");
const EventEmitter = require("devtools/shared/event-emitter");
const WalkerEventListener = require("devtools/client/inspector/shared/walker-event-listener");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
VIEW_NODE_SELECTOR_TYPE,
VIEW_NODE_PROPERTY_TYPE,

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

@ -9,7 +9,6 @@
* editor tooltips that appear when clicking swatch based editors.
*/
const Services = require("Services");
const flags = require("devtools/shared/flags");
const {
VIEW_NODE_VALUE_TYPE,

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

@ -6,7 +6,6 @@
const { components, Ci, Cr, Cu, CC } = require("chrome");
const ChromeUtils = require("ChromeUtils");
const Services = require("Services");
loader.lazyRequireGetter(
this,

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

@ -5,7 +5,6 @@
"use strict";
const { assert } = require("devtools/shared/DevToolsUtils");
const { appinfo } = require("Services");
const {
Component,
createFactory,
@ -146,7 +145,7 @@ class MemoryApp extends Component {
const selectedSnapshot = snapshots.find(s => s.selected);
const selectedIndex = snapshots.indexOf(selectedSnapshot);
const isOSX = appinfo.OS == "Darwin";
const isOSX = Services.appinfo.OS == "Darwin";
const isAccelKey = (isOSX && e.metaKey) || (!isOSX && e.ctrlKey);
// On ACCEL+UP, select previous snapshot.

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

@ -11,7 +11,6 @@ var { require } = BrowserLoader({
window,
});
var { Assert } = require("resource://testing-common/Assert.jsm");
var Services = require("Services");
var EXPECTED_DTU_ASSERT_FAILURE_COUNT = 0;

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

@ -34,7 +34,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
"resource://devtools/client/framework/browser-toolbox/Launcher.sys.mjs",
});
loader.lazyRequireGetter(this, "Services", "Services");
loader.lazyRequireGetter(this, "flags", "devtools/shared/flags");
loader.lazyRequireGetter(

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const {
ADD_BLOCKED_URL,
TOGGLE_BLOCKING_ENABLED,

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

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Services = require("Services");
const {
ACTIVITY_TYPE,
OPEN_NETWORK_DETAILS,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
Component,
createFactory,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
Component,
createFactory,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
Component,
createFactory,

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

@ -9,7 +9,6 @@ const {
createFactory,
} = require("devtools/client/shared/vendor/react");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const Services = require("Services");
const {
connect,
} = require("devtools/client/shared/redux/visibility-handler-connect");

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

@ -16,7 +16,6 @@ const {
connect,
} = require("devtools/client/shared/redux/visibility-handler-connect");
const Services = require("Services");
const { L10N } = require("devtools/client/netmonitor/src/utils/l10n.js");
const {
getMessagePayload,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
Component,
createRef,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
Component,
createFactory,

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

@ -5,7 +5,6 @@
"use strict";
const { createFactory } = require("devtools/client/shared/vendor/react");
const Services = require("Services");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const {

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

@ -10,7 +10,6 @@ const {
} = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const Services = require("Services");
const {
connect,
} = require("devtools/client/shared/redux/visibility-handler-connect");

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

@ -9,7 +9,6 @@ const {
} = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
const Services = require("Services");
const { L10N } = require("devtools/client/netmonitor/src/utils/l10n");
const {
decodeUnicodeBase64,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
ACTIVITY_TYPE,
EVENTS,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
applyMiddleware,
createStore,

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

@ -5,7 +5,6 @@
"use strict";
const { Ci } = require("chrome");
const Services = require("Services");
const {
HarCollector,
} = require("devtools/client/netmonitor/src/har/har-collector");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const appInfo = Services.appinfo;
const { LocalizationHelper } = require("devtools/shared/l10n");
const { CurlUtils } = require("devtools/client/shared/curl");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
getLongStringFullText,
} = require("devtools/client/shared/string-utils");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const JSZip = require("devtools/client/shared/vendor/jszip");
const clipboardHelper = require("devtools/shared/platform/clipboard");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { Ci, Cc, CC } = require("chrome");
const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.sys.mjs");

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
ENABLE_REQUEST_FILTER_TYPE_ONLY,
RESET_COLUMNS,

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const {
CLEAR_REQUESTS,
OPEN_NETWORK_DETAILS,

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

@ -14,7 +14,6 @@
"use strict";
const { Cc, Ci } = require("chrome");
const Services = require("Services");
const { gDevTools } = require("devtools/client/framework/devtools");
/**

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const { L10N } = require("devtools/client/netmonitor/src/utils/l10n");
const {
formDataURI,

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

@ -68,7 +68,6 @@ const createStore = require("devtools/client/shared/redux/create-store");
const reducers = require("devtools/client/performance-new/store/reducers");
const actions = require("devtools/client/performance-new/store/actions");
const { Ci } = require("chrome");
const Services = require("Services");
/**
* Initialize the panel by creating a redux store, and render the root component.

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

@ -28,7 +28,6 @@ const { createLazyLoaders } = ChromeUtils.import(
const lazy = createLazyLoaders({
Chrome: () => require("chrome"),
Services: () => require("Services"),
});
/** @type {PerformancePref["UIBaseUrl"]} */
@ -60,8 +59,6 @@ const UI_BASE_URL_PATH_DEFAULT = "/from-browser";
* @returns {Promise<MockedExports.Browser>} The browser for the opened tab.
*/
async function openProfilerTab(profilerViewMode) {
const Services = lazy.Services();
// Allow the user to point to something other than profiler.firefox.com.
const baseUrl = Services.prefs.getStringPref(
UI_BASE_URL_PREF,
@ -149,7 +146,6 @@ function sharedLibrariesFromProfile(profile) {
* @type {RestartBrowserWithEnvironmentVariable}
*/
function restartBrowserWithEnvironmentVariable(envName, value) {
const Services = lazy.Services();
const { Cc, Ci } = lazy.Chrome();
const env = Cc["@mozilla.org/process/environment;1"].getService(
Ci.nsIEnvironment

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

@ -32,7 +32,6 @@ const Localized = createFactory(
require("devtools/client/shared/vendor/fluent-react").Localized
);
const Services = require("Services");
const { openDocLink } = require("devtools/client/shared/link");
const LEARN_MORE_URL = "https://profiler.firefox.com/docs";

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

@ -4,7 +4,6 @@
"use strict";
const Services = require("Services");
const asyncStorage = require("devtools/shared/async-storage");
const {

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

@ -6,7 +6,6 @@
"use strict";
const Services = require("Services");
const {
createFactory,
PureComponent,

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const {
CHANGE_DISPLAY_PIXEL_RATIO,
CHANGE_USER_AGENT,

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

@ -4,8 +4,6 @@
"use strict";
const Services = require("Services");
const {
ADD_VIEWPORT,
CHANGE_DEVICE,

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

@ -9,7 +9,6 @@ const { require } = ChromeUtils.import(
"resource://devtools/shared/loader/Loader.jsm"
);
const Services = require("Services");
const Store = require("devtools/client/responsive/store");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше