Closed Bug 665544 Opened 10 years ago Closed 10 years ago

Using Quit menu does not save session state as expected

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 7

People

(Reporter: mfinkle, Assigned: mfinkle)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
When closing the last browser window, the code should not track the closing of the tabs in the window. This allows the last tabs in the last window to be restored via the previous tabs list in about:home.

The Quit menu is not calling Browser.closing(), which sends "browser-lastwindow-*" notifications, which SessionStore service uses to correctly handle the session shutdown.

The patch makes it work
Attachment #540464 - Flags: review?(mbrubeck)
Attachment #540464 - Flags: review?(mbrubeck) → review+
You might try instead using BrowserUI._closeOrQuit or sending our cmd_close command. Our cmd_quit uses GlobalOverlay and likely won't call Browser.closing() either. 

http://mxr.mozilla.org/mozilla-central/source/mobile/chrome/content/browser-ui.js#249
(In reply to comment #1)
> You might try instead using BrowserUI._closeOrQuit or sending our cmd_close
> command. Our cmd_quit uses GlobalOverlay and likely won't call
> Browser.closing() either. 
> 
> http://mxr.mozilla.org/mozilla-central/source/mobile/chrome/content/browser-
> ui.js#249

BrowserUI._closeOrQuit has too much extra logic in it. GlobalOverlay would make the right calls, but kills the entire app, not just the current window. That works fine for now, but will be wrong (I think) for webapps, which open in separate windows of the main browser instance.
http://hg.mozilla.org/mozilla-central/rev/c2849ab749bf
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Blocks: 659670
Assignee: nobody → mark.finkle
OS: Linux → All
Hardware: x86 → All
Target Milestone: --- → Firefox 7
VERIFIED FIXED on:

Mozilla /5.0 (Android;Linux armv7l;rv:7.0a1) Gecko/20110621 Firefox/7.0a1 Fennec/7.0a1 

Device: HTC Desire Z(Android 2.2)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.