Closed Bug 488930 Opened 16 years ago Closed 16 years ago

SessionStore can lose track of a window

Categories

(Firefox :: Session Restore, defect)

3.5 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.6a1

People

(Reporter: zeniko, Assigned: zeniko)

References

Details

(Keywords: dataloss, fixed1.9.1, regression)

Attachments

(2 files)

Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1b4pre) Gecko/20090417 SessionStore has several times failed to update the list of closed tabs and in fact the whole browser's state (sessionstore.js untouched for minutes), as if it had lost track of the window. New windows behave fine. I can't however put my finger on what might trigger this behavior, yet.
Blocks: 461634
Attached file sessionstore.js (deleted) —
Steps to Reproduce: 1. Set Firefox to "Show your windows and tabs from last time" on startup. 2. Close it and overwrite the file sessionstore.js with the attached one. 3. Open a link from an external program (i.e. don't start Firefox directly). 4. Hit Ctrl+Shift+T, Ctrl+W, Ctrl+Shift+T Expected result: The same tab (About:) is reopened, closed and reopened. Actual result: Reopening fails the second time - the tab has been forgotten, as will anything else about this window: it's not tracked from the start.
Regression by bug 480148: "aTabs[0].boxObject isn't defined" when the restored window only contained a blank tab and the window was opened with a specified URL (i.e. not the homepage).
Status: UNCONFIRMED → NEW
Depends on: 480148
Ever confirmed: true
Flags: blocking-firefox3.5?
Attached patch fix (deleted) — Splinter Review
Attachment #374690 - Flags: review?(dietrich)
Comment on attachment 374690 [details] [diff] [review] fix can you do a first pass on this?
Attachment #374690 - Flags: review?(dietrich) → review?(paul)
Comment on attachment 374690 [details] [diff] [review] fix Looks good to me. This is at it's core the same problem that oneman brought up after bug 480148 landed (https://bugzilla.mozilla.org/show_bug.cgi?id=480148#c28). r=zpao
Attachment #374690 - Flags: review?(paul)
Attachment #374690 - Flags: review?(dietrich)
Attachment #374690 - Flags: review+
Attachment #374690 - Flags: review?(dietrich) → review+
please add a test if possible. otherwise, request litmus test.
Flags: in-testsuite?
I've only been able to reproduce this at startup, so a Litmus test will be required. Note: Step 2 above can be replaced with: Load about: in a tab, then open a blank tab and close all other tabs before closing the window (and thus exiting Firefox).
Flags: in-testsuite?
Flags: in-testsuite-
Flags: in-litmus?
Keywords: checkin-needed
Assignee: nobody → zeniko
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
Attachment #374690 - Flags: approval1.9.1?
Pasting the following code into the error console generates the error. It's based on code Session Manager and TMP used before bug 480148 dropped. var state = { windows: [{ _closedTabs: [] }], _firstTabs: true }; var win = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser"); Components.classes["@mozilla.org/browser/sessionstore;1"].getService(Components.interfaces.nsISessionStore).setWindowState(win, JSON.stringify(state), false); This can be translated into the following for a litmus test. The following currently generates the error in Firefox 3.5b4, but not the trunk nightlies: let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore); let state = { windows: [{ _closedTabs: [] }], _firstTabs: true }; ss.setWindowState(window, state, false); As such it would be nice to get this and/or bug 461634 into the 1.9.1 branch.
Blocking due to dataloss aspect.
Flags: blocking-firefox3.5? → blocking-firefox3.5+
Comment on attachment 374690 [details] [diff] [review] fix canceling a? due to blocking status.
Attachment #374690 - Flags: approval1.9.1?
Keywords: checkin-needed
Verified with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090618 Minefield/3.6a1pre ID:20090618031329
Status: RESOLVED → VERIFIED
Flags: in-litmus? → in-litmus+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: