mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-31 21:01:55 +00:00
fix: Correctly initialize new sessions for troubleshooting mode, b=no-bug, c=common
This commit is contained in:
@@ -9,8 +9,9 @@
|
||||
# Thus we restrict it to these apps:
|
||||
#
|
||||
# browser: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
# mobile/android: {aa3c5121-dab2-40e2-81ca-7ea25febc110}
|
||||
|
||||
category app-startup nsBrowserGlue @mozilla.org/browser/browserglue;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
category app-startup nsBrowserGlue @mozilla.org/browser/browserglue;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={aa3c5121-dab2-40e2-81ca-7ea25febc110}
|
||||
|
||||
#include common/Components.manifest
|
||||
#include sessionstore/SessionComponents.manifest
|
||||
|
||||
@@ -859,6 +859,7 @@ window.gZenVerticalTabsManager = {
|
||||
|
||||
animateItemOpen(aItem) {
|
||||
if (
|
||||
!gZenUIManager.motion ||
|
||||
!aItem ||
|
||||
!gZenUIManager._hasLoadedDOM ||
|
||||
!aItem.isConnected ||
|
||||
@@ -889,7 +890,7 @@ window.gZenVerticalTabsManager = {
|
||||
},
|
||||
{
|
||||
duration: 0.11,
|
||||
ease: "easeOut",
|
||||
easing: "ease-out",
|
||||
}
|
||||
)
|
||||
.then(() => {})
|
||||
@@ -906,7 +907,7 @@ window.gZenVerticalTabsManager = {
|
||||
},
|
||||
{
|
||||
duration: 0.11,
|
||||
ease: "easeOut",
|
||||
easing: "ease-out",
|
||||
}
|
||||
)
|
||||
.then(() => {})
|
||||
@@ -937,9 +938,8 @@ window.gZenVerticalTabsManager = {
|
||||
}),
|
||||
},
|
||||
{
|
||||
duration: 0.75,
|
||||
ease: "easeOut",
|
||||
fill: "forwards",
|
||||
duration: 0.075,
|
||||
easing: "ease-out",
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# Browser global components initializing before UI startup
|
||||
category browser-before-ui-startup resource:///modules/zen/ZenSessionManager.sys.mjs ZenSessionStore.init
|
||||
category browser-before-ui-startup resource:///modules/zen/ZenWindowSync.sys.mjs ZenWindowSync.init
|
||||
|
||||
# App shutdown consumers
|
||||
|
||||
@@ -9,15 +9,7 @@ const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
// eslint-disable-next-line mozilla/valid-lazy
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
// eslint-disable-next-line mozilla/valid-lazy
|
||||
TabGroupState: "resource:///modules/sessionstore/TabGroupState.sys.mjs",
|
||||
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
||||
// eslint-disable-next-line mozilla/valid-lazy
|
||||
SessionSaver: "resource:///modules/sessionstore/SessionSaver.sys.mjs",
|
||||
// eslint-disable-next-line mozilla/valid-lazy
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
gWindowSyncEnabled: "resource:///modules/zen/ZenWindowSync.sys.mjs",
|
||||
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
||||
});
|
||||
@@ -43,7 +35,7 @@ const BROWSER_STARTUP_RESUME_SESSION = 3;
|
||||
|
||||
// The amount of time (in milliseconds) to wait for our backup regeneration
|
||||
// debouncer to kick off a regeneration.
|
||||
const REGENERATION_DEBOUNCE_RATE_MS = 20 * 60 * 1000; // 20 minutes
|
||||
const REGENERATION_DEBOUNCE_RATE_MS = 5 * 60 * 1000; // 5 minutes
|
||||
|
||||
/**
|
||||
* Class representing the sidebar object stored in the session file.
|
||||
@@ -80,7 +72,6 @@ export class nsZenSessionManager {
|
||||
*/
|
||||
#deferredBackupTask = null;
|
||||
|
||||
// Called from SessionComponents.manifest on app-startup
|
||||
init() {
|
||||
this.log("Initializing session manager");
|
||||
let profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile).path;
|
||||
@@ -101,7 +92,8 @@ export class nsZenSessionManager {
|
||||
|
||||
log(...args) {
|
||||
if (lazy.gShouldLog) {
|
||||
console.warn("ZenSessionManager:", ...args);
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("ZenSessionManager:", ...args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +144,7 @@ export class nsZenSessionManager {
|
||||
* @see SessionFileInternal.read
|
||||
*/
|
||||
async readFile() {
|
||||
this.init();
|
||||
try {
|
||||
this.log("Reading Zen session file from disk");
|
||||
let promises = [];
|
||||
|
||||
@@ -125,7 +125,8 @@ class nsZenWindowSync {
|
||||
|
||||
log(...args) {
|
||||
if (lazy.gShouldLog) {
|
||||
console.warn("ZenWindowSync:", ...args);
|
||||
// eslint-disable-next-line no-console
|
||||
console.info("ZenWindowSync:", ...args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user