mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 481786 - Current session data is getting lost when starting Firefox in "Always On" mode; r=zeniko
This commit is contained in:
parent
238c579e67
commit
ed3e8a5706
@ -43,7 +43,8 @@
|
||||
# * Overview
|
||||
# * This service reads user's session file at startup, and makes a determination
|
||||
# * as to whether the session should be restored. It will restore the session
|
||||
# * under the circumstances described below.
|
||||
# * under the circumstances described below. If the auto-start Private Browsing
|
||||
# * mode is active, however, the session is never restored.
|
||||
# *
|
||||
# * Crash Detection
|
||||
# * The session file stores a session.state property, that
|
||||
@ -95,6 +96,12 @@ SessionStartup.prototype = {
|
||||
* Initialize the component
|
||||
*/
|
||||
init: function sss_init() {
|
||||
// do not need to initialize anything in auto-started private browsing sessions
|
||||
let pbs = Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
if (pbs.autoStarted)
|
||||
return;
|
||||
|
||||
let prefBranch = Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefService).getBranch("browser.");
|
||||
|
||||
|
@ -415,7 +415,9 @@ SessionStoreService.prototype = {
|
||||
case "exit":
|
||||
aSubject.QueryInterface(Ci.nsISupportsPRBool);
|
||||
let quitting = aSubject.data;
|
||||
if (quitting) {
|
||||
let pbs = Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
if (quitting && !pbs.autoStarted) {
|
||||
// save the backed up state with session set to stopped,
|
||||
// otherwise resuming next time would look like a crash
|
||||
if ("_stateBackup" in this) {
|
||||
|
Loading…
Reference in New Issue
Block a user