mirror of
https://github.com/zen-browser/desktop
synced 2026-04-25 17:15:00 +02: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:
|
# Thus we restrict it to these apps:
|
||||||
#
|
#
|
||||||
# browser: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
# 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 common/Components.manifest
|
||||||
#include sessionstore/SessionComponents.manifest
|
#include sessionstore/SessionComponents.manifest
|
||||||
|
|||||||
@@ -859,6 +859,7 @@ window.gZenVerticalTabsManager = {
|
|||||||
|
|
||||||
animateItemOpen(aItem) {
|
animateItemOpen(aItem) {
|
||||||
if (
|
if (
|
||||||
|
!gZenUIManager.motion ||
|
||||||
!aItem ||
|
!aItem ||
|
||||||
!gZenUIManager._hasLoadedDOM ||
|
!gZenUIManager._hasLoadedDOM ||
|
||||||
!aItem.isConnected ||
|
!aItem.isConnected ||
|
||||||
@@ -889,7 +890,7 @@ window.gZenVerticalTabsManager = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
duration: 0.11,
|
duration: 0.11,
|
||||||
ease: "easeOut",
|
easing: "ease-out",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {})
|
.then(() => {})
|
||||||
@@ -906,7 +907,7 @@ window.gZenVerticalTabsManager = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
duration: 0.11,
|
duration: 0.11,
|
||||||
ease: "easeOut",
|
easing: "ease-out",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {})
|
.then(() => {})
|
||||||
@@ -937,9 +938,8 @@ window.gZenVerticalTabsManager = {
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
duration: 0.75,
|
duration: 0.075,
|
||||||
ease: "easeOut",
|
easing: "ease-out",
|
||||||
fill: "forwards",
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
# Browser global components initializing before UI startup
|
# 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
|
category browser-before-ui-startup resource:///modules/zen/ZenWindowSync.sys.mjs ZenWindowSync.init
|
||||||
|
|
||||||
# App shutdown consumers
|
# App shutdown consumers
|
||||||
|
|||||||
@@ -9,15 +9,7 @@ const lazy = {};
|
|||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
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",
|
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",
|
gWindowSyncEnabled: "resource:///modules/zen/ZenWindowSync.sys.mjs",
|
||||||
DeferredTask: "resource://gre/modules/DeferredTask.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
|
// The amount of time (in milliseconds) to wait for our backup regeneration
|
||||||
// debouncer to kick off a 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.
|
* Class representing the sidebar object stored in the session file.
|
||||||
@@ -80,7 +72,6 @@ export class nsZenSessionManager {
|
|||||||
*/
|
*/
|
||||||
#deferredBackupTask = null;
|
#deferredBackupTask = null;
|
||||||
|
|
||||||
// Called from SessionComponents.manifest on app-startup
|
|
||||||
init() {
|
init() {
|
||||||
this.log("Initializing session manager");
|
this.log("Initializing session manager");
|
||||||
let profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile).path;
|
let profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile).path;
|
||||||
@@ -101,7 +92,8 @@ export class nsZenSessionManager {
|
|||||||
|
|
||||||
log(...args) {
|
log(...args) {
|
||||||
if (lazy.gShouldLog) {
|
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
|
* @see SessionFileInternal.read
|
||||||
*/
|
*/
|
||||||
async readFile() {
|
async readFile() {
|
||||||
|
this.init();
|
||||||
try {
|
try {
|
||||||
this.log("Reading Zen session file from disk");
|
this.log("Reading Zen session file from disk");
|
||||||
let promises = [];
|
let promises = [];
|
||||||
|
|||||||
@@ -125,7 +125,8 @@ class nsZenWindowSync {
|
|||||||
|
|
||||||
log(...args) {
|
log(...args) {
|
||||||
if (lazy.gShouldLog) {
|
if (lazy.gShouldLog) {
|
||||||
console.warn("ZenWindowSync:", ...args);
|
// eslint-disable-next-line no-console
|
||||||
|
console.info("ZenWindowSync:", ...args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user