зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1660781 - Lazily load all external modules in Marionette's JSWindowActor classes. r=marionette-reviewers,maja_zf
To prevent performance degration and extra memory usage in Firefox for newly spawned content processes, only load external modules if required in both the parent and child actor. Differential Revision: https://phabricator.services.mozilla.com/D88138
This commit is contained in:
Родитель
addce72fc2
Коммит
179a2de2af
|
@ -10,14 +10,12 @@ const { XPCOMUtils } = ChromeUtils.import(
|
||||||
"resource://gre/modules/XPCOMUtils.jsm"
|
"resource://gre/modules/XPCOMUtils.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { element } = ChromeUtils.import(
|
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||||
"chrome://marionette/content/element.js"
|
element: "chrome://marionette/content/element.js",
|
||||||
);
|
error: "chrome://marionette/content/error.js",
|
||||||
const { error } = ChromeUtils.import("chrome://marionette/content/error.js");
|
evaluate: "chrome://marionette/content/evaluate.js",
|
||||||
const { evaluate } = ChromeUtils.import(
|
Log: "chrome://marionette/content/log.js",
|
||||||
"chrome://marionette/content/evaluate.js"
|
});
|
||||||
);
|
|
||||||
const { Log } = ChromeUtils.import("chrome://marionette/content/log.js");
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(this, "logger", Log.get);
|
XPCOMUtils.defineLazyGetter(this, "logger", Log.get);
|
||||||
|
|
||||||
|
|
|
@ -10,15 +10,13 @@ const { XPCOMUtils } = ChromeUtils.import(
|
||||||
"resource://gre/modules/XPCOMUtils.jsm"
|
"resource://gre/modules/XPCOMUtils.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { EventEmitter } = ChromeUtils.import(
|
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||||
"resource://gre/modules/EventEmitter.jsm"
|
EventEmitter: "resource://gre/modules/EventEmitter.jsm",
|
||||||
);
|
|
||||||
|
|
||||||
const { error } = ChromeUtils.import("chrome://marionette/content/error.js");
|
error: "chrome://marionette/content/error.js",
|
||||||
const { evaluate } = ChromeUtils.import(
|
evaluate: "chrome://marionette/content/evaluate.js",
|
||||||
"chrome://marionette/content/evaluate.js"
|
Log: "chrome://marionette/content/log.js",
|
||||||
);
|
});
|
||||||
const { Log } = ChromeUtils.import("chrome://marionette/content/log.js");
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(this, "logger", Log.get);
|
XPCOMUtils.defineLazyGetter(this, "logger", Log.get);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче