Bug 1369467 - Move a few module imports off of app-startup, r=mconley.

This commit is contained in:
Florian Quèze 2017-06-02 22:08:21 +02:00
Родитель 8ab22cf0e7
Коммит 6e4f665838
4 изменённых файлов: 14 добавлений и 13 удалений

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

@ -28,9 +28,9 @@ const startupPhases = {
"MainProcessSingleton.js",
// Bugs to fix: The following components shouldn't be initialized that early.
"WebContentConverter.js",
"nsSessionStartup.js",
"PushComponents.js",
"WebContentConverter.js", // bug 1369443
"nsSessionStartup.js", // bug 1369456
"PushComponents.js", // bug 1369436
]),
modules: new Set([
"resource://gre/modules/AppConstants.jsm",
@ -38,12 +38,9 @@ const startupPhases = {
"resource://gre/modules/Services.jsm",
// Bugs to fix: Probably loaded too early, needs investigation.
"resource://gre/modules/Log.jsm",
"resource://gre/modules/AsyncPrefs.jsm",
"resource://gre/modules/RemotePageManager.jsm",
"resource://gre/modules/TelemetryStopwatch.jsm",
"resource://gre/modules/PrivateBrowsingUtils.jsm",
"resource://gre/modules/Promise.jsm"
"resource://gre/modules/AsyncPrefs.jsm", // bug 1369460
"resource://gre/modules/RemotePageManager.jsm", // bug 1369466
"resource://gre/modules/Promise.jsm" // bug 1368456
])
}},

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

@ -5,7 +5,8 @@
Components.utils.import("resource://gre/modules/Services.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 Ci = Components.interfaces;

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

@ -37,8 +37,6 @@ const Cr = Components.results;
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.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");
XPCOMUtils.defineLazyModuleGetter(this, "console",
@ -49,6 +47,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "StartupPerformance",
"resource:///modules/sessionstore/StartupPerformance.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "CrashMonitor",
"resource://gre/modules/CrashMonitor.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm");
const STATE_RUNNING_STR = "running";

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

@ -8,7 +8,10 @@ const Cu = Components.utils;
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"]
.getService(Ci.nsITelemetry);