Bug 1700959 - [marionette] Always lazy-load dependent modules for the Marionette component. r=marionette-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D109538
This commit is contained in:
Henrik Skupin 2021-03-25 14:25:09 +00:00
parent c4a5780b6f
commit 15fa348d97
3 changed files with 6 additions and 11 deletions

View File

@ -4,21 +4,17 @@
"use strict";
const { ComponentUtils } = ChromeUtils.import(
"resource://gre/modules/ComponentUtils.jsm"
);
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
);
const { EnvironmentPrefs, MarionettePrefs } = ChromeUtils.import(
"chrome://marionette/content/prefs.js",
null
);
XPCOMUtils.defineLazyModuleGetters(this, {
ComponentUtils: "resource://gre/modules/ComponentUtils.jsm",
EnvironmentPrefs: "chrome://marionette/content/prefs.js",
Log: "chrome://marionette/content/log.js",
MarionettePrefs: "chrome://marionette/content/prefs.js",
Preferences: "resource://gre/modules/Preferences.jsm",
TCPListener: "chrome://marionette/content/server.js",
});

View File

@ -4,7 +4,7 @@
"use strict";
const EXPORTED_SYMBOLS = ["Branch", "MarionettePrefs"];
const EXPORTED_SYMBOLS = ["Branch", "EnvironmentPrefs", "MarionettePrefs"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { XPCOMUtils } = ChromeUtils.import(

View File

@ -19,8 +19,7 @@ XPCOMUtils.defineLazyServiceGetter(
);
const { Branch, EnvironmentPrefs, MarionettePrefs } = ChromeUtils.import(
"chrome://marionette/content/prefs.js",
null
"chrome://marionette/content/prefs.js"
);
function reset() {