Closed
Bug 488930
Opened 16 years ago
Closed 16 years ago
SessionStore can lose track of a window
Categories
(Firefox :: Session Restore, defect)
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.
Assignee | ||
Comment 1•16 years ago
|
||
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.
Assignee | ||
Comment 2•16 years ago
|
||
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).
Assignee | ||
Comment 3•16 years ago
|
||
Attachment #374690 -
Flags: review?(dietrich)
Comment 4•16 years ago
|
||
Comment on attachment 374690 [details] [diff] [review]
fix
can you do a first pass on this?
Attachment #374690 -
Flags: review?(dietrich) → review?(paul)
Comment 5•16 years ago
|
||
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+
Comment 6•16 years ago
|
||
Comment on attachment 374690 [details] [diff] [review]
fix
r=me
Attachment #374690 -
Flags: review?(dietrich) → review+
Comment 7•16 years ago
|
||
please add a test if possible. otherwise, request litmus test.
Flags: in-testsuite?
Assignee | ||
Comment 8•16 years ago
|
||
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).
Comment 9•16 years ago
|
||
Assignee: nobody → zeniko
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
Assignee | ||
Updated•16 years ago
|
Attachment #374690 -
Flags: approval1.9.1?
Comment 10•16 years ago
|
||
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.
Comment 11•16 years ago
|
||
Blocking due to dataloss aspect.
Flags: blocking-firefox3.5? → blocking-firefox3.5+
Comment 12•16 years ago
|
||
Comment on attachment 374690 [details] [diff] [review]
fix
canceling a? due to blocking status.
Attachment #374690 -
Flags: approval1.9.1?
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Comment 13•16 years ago
|
||
Keywords: checkin-needed → fixed1.9.1
Comment 16•15 years ago
|
||
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
Comment 17•15 years ago
|
||
Flags: in-litmus? → in-litmus+
You need to log in
before you can comment on or make changes to this bug.
Description
•