Closed
Bug 694378
Opened 12 years ago
Closed 12 years ago
session restore fails when selectedWindow > number of windows
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 10
People
(Reporter: wsmwk, Assigned: zpao)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
2.99 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #567646 +++ I'm seeing this again - precisely the same steps and symptoms. I had deselected all tabs and windows in the restore list except tab 1 (which was a previous/nested session list) Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:10.0a1) Gecko/20111006 Firefox/10.0a1 1. killed firefox 2. started firefox 3. unselected several windows and tabs from restore:session window 4. clicked Restore results: restore button dims, and tabs were not restored 5. select all the tabs in "windows 1" results: restore works error console contains .... Error: uncaught exception: [Exception... "'[JavaScript Error: "winData is undefined" {file: "resource:///components/nsSessionStore.js" line: 2579}]' when calling method: [nsISessionStore::setWindowState]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://browser/content/aboutSessionRestore.js :: restoreSession :: line 140" data: yes]
Reporter | ||
Updated•12 years ago
|
Hardware: x86 → x86_64
Assignee | ||
Comment 1•12 years ago
|
||
This is a regression from bug 669272. This happens when selectedWindow is > windows.length. we then unshift undefined to the front of the windows array and puts us in this case.
Assignee | ||
Comment 2•12 years ago
|
||
I should probably write a test for this, but this does fix it. Trust me, I'm a doctor (or something)
Assignee: nobody → paul
Attachment #566917 -
Flags: review?(dietrich)
Assignee | ||
Comment 3•12 years ago
|
||
Now with a test.
Attachment #566917 -
Attachment is obsolete: true
Attachment #566917 -
Flags: review?(dietrich)
Attachment #567631 -
Flags: review?(dietrich)
Comment 4•12 years ago
|
||
Comment on attachment 567631 [details] [diff] [review] Patch v0.2 Review of attachment 567631 [details] [diff] [review]: ----------------------------------------------------------------- r=me ::: browser/components/sessionstore/src/nsSessionStore.js @@ +2564,5 @@ > if (root._closedWindows) > this._closedWindows = root._closedWindows; > > var winData; > + if (!root.selectedWindow || root.selectedWindow > root.windows.length) { would dig seeing selectedWindow renamed to selectedWindowIndex or something more self-descriptive like that. but that's a nice-to-have.
Attachment #567631 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Dietrich Ayala (:dietrich) from comment #4) > would dig seeing selectedWindow renamed to selectedWindowIndex or something > more self-descriptive like that. but that's a nice-to-have. I'm going to keep it for now. I've resisted the strong urge to change any of the existing keys for a while. There are other changes to the format I want to make (for example, not have the indexes be 1-based). I think it might make sense to just do all the changes at once (though that's going to be fun for Sync)
Assignee | ||
Updated•12 years ago
|
Summary: sessions not restored if some tabs deselected in sessionrestore list → session restore fails when selectedWindow > number of windows
Assignee | ||
Comment 6•12 years ago
|
||
pushed to fx-team: https://hg.mozilla.org/integration/fx-team/rev/5d7c2550a61e
Whiteboard: [fixed-in-fx-team]
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5d7c2550a61e
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 10
You need to log in
before you can comment on or make changes to this bug.
Description
•