mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 1379788 - Stop loading RecentWindow.jsm during startup, r=Gijs.
This commit is contained in:
parent
b9b1a8454e
commit
3d56aac575
@ -70,6 +70,7 @@ const startupPhases = {
|
||||
modules: new Set([
|
||||
"resource:///modules/AboutNewTab.jsm",
|
||||
"resource:///modules/DirectoryLinksProvider.jsm",
|
||||
"resource:///modules/RecentWindow.jsm",
|
||||
"resource://gre/modules/BookmarkHTMLUtils.jsm",
|
||||
"resource://gre/modules/Bookmarks.jsm",
|
||||
"resource://gre/modules/ContextualIdentityService.jsm",
|
||||
|
@ -8,7 +8,9 @@ Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
Components.utils.import("resource:///modules/RecentWindow.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
|
||||
"resource:///modules/RecentWindow.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "ShellService",
|
||||
"resource:///modules/ShellService.jsm");
|
||||
|
@ -305,17 +305,14 @@ this.BrowserUITelemetry = {
|
||||
// our measurements because at that point all browser windows have
|
||||
// probably been closed, since the vast majority of saved-session
|
||||
// pings are gathered during shutdown.
|
||||
let win = RecentWindow.getMostRecentBrowserWindow({
|
||||
private: false,
|
||||
allowPopups: false,
|
||||
});
|
||||
|
||||
Services.search.init(rv => {
|
||||
// If there are no such windows (or we've just about found one
|
||||
// but it's closed already), we're out of luck. :(
|
||||
let hasWindow = win && !win.closed;
|
||||
this._firstWindowMeasurements = hasWindow ? this._getWindowMeasurements(win, rv)
|
||||
: {};
|
||||
let win = RecentWindow.getMostRecentBrowserWindow({
|
||||
private: false,
|
||||
allowPopups: false,
|
||||
});
|
||||
// If there are no such windows, we're out of luck. :(
|
||||
this._firstWindowMeasurements = win ? this._getWindowMeasurements(win, rv)
|
||||
: {};
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -47,7 +47,7 @@ this.ExtensionsUI = {
|
||||
Services.obs.addObserver(this, "webextension-install-notify");
|
||||
Services.obs.addObserver(this, "webextension-optional-permission-prompt");
|
||||
|
||||
await RecentWindow.getMostRecentBrowserWindow().delayedStartupPromise;
|
||||
await Services.wm.getMostRecentWindow("navigator:browser").delayedStartupPromise;
|
||||
|
||||
this._checkForSideloaded();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user