The default bug view has changed. See this FAQ.

Switch Profile does not Prompt to Save existing Session Restore

RESOLVED FIXED in seamonkey2.12

Status

SeaMonkey
Session Restore
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: therube, Assigned: neil@parkwaycc.co.uk)

Tracking

SeaMonkey 2.1 Branch
seamonkey2.12
x86
Windows XP

SeaMonkey Tracking Flags

(seamonkey2.10 fixed, seamonkey2.11 fixed, seamonkey2.12 fixed)

Details

(Whiteboard: [SmBugEvent])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20110511 Firefox/4.0.1 SeaMonkey/2.1
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20110511 Firefox/4.0.1 SeaMonkey/2.1

 
Switching Profile does not prompt to save the existing Session Restore.
Session Restore is not invoked upon returning to initial Profile.
 

Reproducible: Always

Steps to Reproduce:
 
1. Start SeaMonkey, one Window, open one tab in that window
- Profile1
2. Quit SeaMonkey (Ctrl+Q), saving the session (Save and Quit)
3. Restart SeaMonkey
- still Profile1
4. Tools Switch Profile, changing to a different Profile2
- Profile2 opens
5. Tools Switch Profile, change back to Profile1
 

Actual Results:  
 
Profile1 opens.
But Session Restore did not kick in.
Windows/tabs that were opened & saved from the initial Profile1 session are not restored after Switch Profile & then switching back.
 

Expected Results:  
 
Switching Profile should prompt to 'Save and Switch' / 'Switch' / 'Quit'.
If 'Save and Switch' is selected, Session Restore should be invoked upon return to the initial Profile.
 

 
Suppose that sessionstore.json does retain what was there even without explicitly Saving, so about:sessionrestore is able to recover the last session - assuming that you realize this & remember to invoke it.
 
Don't think this applies to FF as I don't believe it has an interactive method to invoke Switch Profile?  (Can only be done from command line/shortcut, so that kind of means you've already exited the browser, so should not be an issue there.)
(Reporter)

Updated

6 years ago
Whiteboard: SmBugEvent

Updated

6 years ago
Component: General → Session Restore
QA Contact: general → session.restore
Whiteboard: SmBugEvent → [SmBugEvent]
Version: unspecified → SeaMonkey 2.1 Branch
(Assignee)

Comment 1

5 years ago
Created attachment 619864 [details] [diff] [review]
Proposed patch

Might as well use Application.restart()'s goodness...
Assignee: nobody → neil
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #619864 - Flags: review?(philip.chee)

Comment 2

5 years ago
Comment on attachment 619864 [details] [diff] [review]
Proposed patch

OK, this works only if browser.warnOnRestart is set to true. when set to false nsSuiteGlue.js skips not just the close warning prompt but also skips setting |this._saveSession = true|
Attachment #619864 - Flags: review?(philip.chee)
(Assignee)

Comment 3

5 years ago
(In reply to Philip Chee from comment #2)
> this works only if browser.warnOnRestart is set to true.
Which is the default...

> when set to
> false nsSuiteGlue.js skips not just the close warning prompt but also skips
> setting |this._saveSession = true|
That's not this bug...
(Assignee)

Comment 4

5 years ago
(In reply to Philip Chee from comment #2)
> when set to
> false nsSuiteGlue.js skips not just the close warning prompt but also skips
> setting |this._saveSession = true|
We just copied nsBrowserGlue.js, I don't know what's desired. (Firefox seems to always save the session without prompting, but I don't know how that works...)
(Assignee)

Comment 5

5 years ago
Created attachment 620659 [details] [diff] [review]
Proposed patch

We're quitting the profile, so we need to prompt as such.
Attachment #619864 - Attachment is obsolete: true
Attachment #620659 - Flags: review?(philip.chee)

Comment 6

5 years ago
Comment on attachment 620659 [details] [diff] [review]
Proposed patch

Right this one works. Although for some reason I needed -purgecaches before I could get it working.
Attachment #620659 - Flags: review?(philip.chee) → review+
(Assignee)

Comment 7

5 years ago
Pushed changeset 9f6f5ed9a5a8 to comm-central.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Comment 8

5 years ago
Comment on attachment 620659 [details] [diff] [review]
Proposed patch

[Approval Request Comment]
Regression caused by (bug #): 496696 (for browser as described)
User impact if declined: potential dataloss (other windows also affected)
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): low
String changes made by this patch: none
Attachment #620659 - Flags: approval-comm-beta?
Attachment #620659 - Flags: approval-comm-aurora?

Updated

5 years ago
Attachment #620659 - Flags: approval-comm-beta?
Attachment #620659 - Flags: approval-comm-beta+
Attachment #620659 - Flags: approval-comm-aurora?
Attachment #620659 - Flags: approval-comm-aurora+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
Whiteboard: [SmBugEvent] → [SmBugEvent][transplant changeset 9f6f5ed9a5a8]

Comment 9

5 years ago
Pushed to branches:
http://hg.mozilla.org/releases/comm-aurora/rev/b2d336a5fe2a
http://hg.mozilla.org/releases/comm-beta/rev/8ebc2999a46b
status-seamonkey2.10: --- → fixed
status-seamonkey2.11: --- → fixed
status-seamonkey2.12: --- → fixed
Whiteboard: [SmBugEvent][transplant changeset 9f6f5ed9a5a8] → [SmBugEvent]
Target Milestone: --- → seamonkey2.12

Updated

5 years ago
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.