зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1351008 - Lazily load Manifest jsms in manifestMessages.js. r=baku
This avoids loading 7 jsms until they are actually needed, reducing content process memory usage. MozReview-Commit-ID: 8ukNr7PL80A --HG-- extra : rebase_source : a926a19645ffcacadec93ecc79927d356d603114
This commit is contained in:
Родитель
935d22e0f2
Коммит
a8cef3c230
|
@ -16,11 +16,16 @@
|
||||||
const {
|
const {
|
||||||
utils: Cu,
|
utils: Cu,
|
||||||
} = Components;
|
} = Components;
|
||||||
Cu.import("resource://gre/modules/ManifestObtainer.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/ManifestFinder.jsm");
|
|
||||||
Cu.import("resource://gre/modules/ManifestIcons.jsm");
|
|
||||||
Cu.import("resource://gre/modules/Task.jsm");
|
Cu.import("resource://gre/modules/Task.jsm");
|
||||||
|
|
||||||
|
XPCOMUtils.defineLazyModuleGetter(this, "ManifestObtainer",
|
||||||
|
"resource://gre/modules/ManifestObtainer.jsm");
|
||||||
|
XPCOMUtils.defineLazyModuleGetter(this, "ManifestFinder",
|
||||||
|
"resource://gre/modules/ManifestFinder.jsm");
|
||||||
|
XPCOMUtils.defineLazyModuleGetter(this, "ManifestIcons",
|
||||||
|
"resource://gre/modules/ManifestIcons.jsm");
|
||||||
|
|
||||||
const MessageHandler = {
|
const MessageHandler = {
|
||||||
registerListeners() {
|
registerListeners() {
|
||||||
addMessageListener(
|
addMessageListener(
|
||||||
|
|
Загрузка…
Ссылка в новой задаче