зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1369467 - Move a few module imports off of app-startup, r=mconley.
This commit is contained in:
Родитель
8ab22cf0e7
Коммит
6e4f665838
|
@ -28,9 +28,9 @@ const startupPhases = {
|
||||||
"MainProcessSingleton.js",
|
"MainProcessSingleton.js",
|
||||||
|
|
||||||
// Bugs to fix: The following components shouldn't be initialized that early.
|
// Bugs to fix: The following components shouldn't be initialized that early.
|
||||||
"WebContentConverter.js",
|
"WebContentConverter.js", // bug 1369443
|
||||||
"nsSessionStartup.js",
|
"nsSessionStartup.js", // bug 1369456
|
||||||
"PushComponents.js",
|
"PushComponents.js", // bug 1369436
|
||||||
]),
|
]),
|
||||||
modules: new Set([
|
modules: new Set([
|
||||||
"resource://gre/modules/AppConstants.jsm",
|
"resource://gre/modules/AppConstants.jsm",
|
||||||
|
@ -38,12 +38,9 @@ const startupPhases = {
|
||||||
"resource://gre/modules/Services.jsm",
|
"resource://gre/modules/Services.jsm",
|
||||||
|
|
||||||
// Bugs to fix: Probably loaded too early, needs investigation.
|
// Bugs to fix: Probably loaded too early, needs investigation.
|
||||||
"resource://gre/modules/Log.jsm",
|
"resource://gre/modules/AsyncPrefs.jsm", // bug 1369460
|
||||||
"resource://gre/modules/AsyncPrefs.jsm",
|
"resource://gre/modules/RemotePageManager.jsm", // bug 1369466
|
||||||
"resource://gre/modules/RemotePageManager.jsm",
|
"resource://gre/modules/Promise.jsm" // bug 1368456
|
||||||
"resource://gre/modules/TelemetryStopwatch.jsm",
|
|
||||||
"resource://gre/modules/PrivateBrowsingUtils.jsm",
|
|
||||||
"resource://gre/modules/Promise.jsm"
|
|
||||||
])
|
])
|
||||||
}},
|
}},
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
|
||||||
|
"resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||||
|
|
||||||
const Cc = Components.classes;
|
const Cc = Components.classes;
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
|
|
|
@ -37,8 +37,6 @@ const Cr = Components.results;
|
||||||
const Cu = Components.utils;
|
const Cu = Components.utils;
|
||||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
Cu.import("resource://gre/modules/Services.jsm");
|
||||||
Cu.import("resource://gre/modules/TelemetryStopwatch.jsm");
|
|
||||||
Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
|
||||||
Cu.import("resource://gre/modules/Promise.jsm");
|
Cu.import("resource://gre/modules/Promise.jsm");
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "console",
|
XPCOMUtils.defineLazyModuleGetter(this, "console",
|
||||||
|
@ -49,6 +47,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "StartupPerformance",
|
||||||
"resource:///modules/sessionstore/StartupPerformance.jsm");
|
"resource:///modules/sessionstore/StartupPerformance.jsm");
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "CrashMonitor",
|
XPCOMUtils.defineLazyModuleGetter(this, "CrashMonitor",
|
||||||
"resource://gre/modules/CrashMonitor.jsm");
|
"resource://gre/modules/CrashMonitor.jsm");
|
||||||
|
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
|
||||||
|
"resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||||
|
|
||||||
const STATE_RUNNING_STR = "running";
|
const STATE_RUNNING_STR = "running";
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,10 @@ const Cu = Components.utils;
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["TelemetryStopwatch"];
|
this.EXPORTED_SYMBOLS = ["TelemetryStopwatch"];
|
||||||
|
|
||||||
Cu.import("resource://gre/modules/Log.jsm", this);
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
XPCOMUtils.defineLazyModuleGetter(this, "Log",
|
||||||
|
"resource://gre/modules/Log.jsm");
|
||||||
|
|
||||||
var Telemetry = Cc["@mozilla.org/base/telemetry;1"]
|
var Telemetry = Cc["@mozilla.org/base/telemetry;1"]
|
||||||
.getService(Ci.nsITelemetry);
|
.getService(Ci.nsITelemetry);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче