Closed Bug 658280 Opened 13 years ago Closed 12 years ago

Switch Profile does not Prompt to Save existing Session Restore

Categories

(SeaMonkey :: Session Restore, defect)

SeaMonkey 2.1 Branch
x86
Windows XP
defect
Not set
normal

Tracking

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

RESOLVED FIXED
seamonkey2.12
Tracking Status
seamonkey2.10 --- fixed
seamonkey2.11 --- fixed
seamonkey2.12 --- fixed

People

(Reporter: therubex, Assigned: neil)

Details

(Whiteboard: [SmBugEvent])

Attachments

(1 file, 1 obsolete file)

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.)
Whiteboard: SmBugEvent
Component: General → Session Restore
QA Contact: general → session.restore
Whiteboard: SmBugEvent → [SmBugEvent]
Version: unspecified → SeaMonkey 2.1 Branch
Attached patch Proposed patch (obsolete) — Splinter Review
Might as well use Application.restart()'s goodness...
Assignee: nobody → neil
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #619864 - Flags: review?(philip.chee)
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)
(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...
(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...)
Attached patch Proposed patchSplinter Review
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 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+
Pushed changeset 9f6f5ed9a5a8 to comm-central.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
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?
Attachment #620659 - Flags: approval-comm-beta?
Attachment #620659 - Flags: approval-comm-beta+
Attachment #620659 - Flags: approval-comm-aurora?
Attachment #620659 - Flags: approval-comm-aurora+
Keywords: checkin-needed
Whiteboard: [SmBugEvent] → [SmBugEvent][transplant changeset 9f6f5ed9a5a8]
Pushed to branches:
http://hg.mozilla.org/releases/comm-aurora/rev/b2d336a5fe2a
http://hg.mozilla.org/releases/comm-beta/rev/8ebc2999a46b
Whiteboard: [SmBugEvent][transplant changeset 9f6f5ed9a5a8] → [SmBugEvent]
Target Milestone: --- → seamonkey2.12
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: