Closed
Bug 347336
Opened 18 years ago
Closed 18 years ago
[SessionStore] Preserve the list of recently closed tabs during one session
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 2
People
(Reporter: zeniko, Assigned: zeniko)
Details
(Keywords: fixed1.8.1)
Attachments
(3 files, 1 obsolete file)
1.15 KB,
patch
|
dietrich
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
1.17 KB,
patch
|
mconnor
:
review+
mconnor
:
approval1.8.1+
|
Details | Diff | Splinter Review |
1.20 KB,
patch
|
mconnor
:
review+
mconnor
:
approval1.8.1+
|
Details | Diff | Splinter Review |
... so that Undo Close Tab is still available after a crash.
Assignee | ||
Comment 1•18 years ago
|
||
Comment 2•18 years ago
|
||
>
> if (aOverwriteTabs) {
> this.restoreWindowFeatures(aWindow, winData, root.opener || null);
>+ if (winData._closedTabs) {
>+ this._windows[aWindow.__SSi]._closedTabs = winData._closedTabs;
>+ }
> }
Why are you making restoration of this data depend on aOverwriteTabs being true? IIRC, if an app update was downloaded pre-crash and then applied when restarting post-crash, aOverwriteTabs would be false, and we'd want to restore this data in that scenario.
Assignee | ||
Comment 3•18 years ago
|
||
Indeed, at startup we've got root._firstTabs but not aOverwriteTabs set for the very first window. Thanks for catching that.
Attachment #232104 -
Attachment is obsolete: true
Attachment #232672 -
Flags: review?(dietrich)
Attachment #232104 -
Flags: review?(dietrich)
Assignee | ||
Comment 4•18 years ago
|
||
Drivers: This simple patch ensures that the list of recently closed tabs isn't lost after a crash and also allows extensions to restore that list when restoring an arbitrary session (which so far isn't possible). The patch's risk is low.
Flags: blocking-firefox2?
Whiteboard: [has patch][needs review dietrich]
Target Milestone: --- → Firefox 2
Updated•18 years ago
|
Attachment #232672 -
Flags: review?(dietrich) → review+
Updated•18 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][needs review dietrich] → [has patch]
Assignee | ||
Updated•18 years ago
|
Attachment #232672 -
Flags: approval1.8.1?
Updated•18 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
Updated•18 years ago
|
Whiteboard: [has patch] → [181approval pending]
Comment 5•18 years ago
|
||
Comment on attachment 232672 [details] [diff] [review]
fix (restores the list at startup and when overwriting a window)
a=schrep for drivers - approving all [181approval pending] bugs now that tree is open.
Attachment #232672 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Updated•18 years ago
|
Whiteboard: [181approval pending] → [checkin needed (1.8 branch)]
Updated•18 years ago
|
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
Comment 6•18 years ago
|
||
On branch, the patch for this bug caused the regression noted in bug 343871 comment #15.
Comment 7•18 years ago
|
||
This patch fixes a race condition wherein we assumed that the domwindowopened notification would always be received before a window's contents would be restored. The fix initializes windows prior to attempting restoration, for windows have not yet been initialized.
Attachment #235504 -
Flags: review?(mconnor)
Updated•18 years ago
|
Whiteboard: [has patch][needs review mconnor]
Comment 8•18 years ago
|
||
Comment on attachment 235504 [details] [diff] [review]
initialize windows before restoring them
good catch, thanks!
Attachment #235504 -
Flags: review?(mconnor) → review+
Updated•18 years ago
|
Whiteboard: [has patch][needs review mconnor] → [has patch][checkin needed]
Comment 9•18 years ago
|
||
Checking in nsSessionStore.js;
/cvsroot/mozilla/browser/components/sessionstore/src/nsSessionStore.js,v <-- nsSessionStore.js
new revision: 1.41; previous revision: 1.40
done
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][checkin needed] → [baking][needs a]
Comment 10•18 years ago
|
||
Comment on attachment 235504 [details] [diff] [review]
initialize windows before restoring them
Drivers: This fixes a serious problem in which secondary restored windows have tabs but no content.
Attachment #235504 -
Flags: approval1.8.1?
Assignee | ||
Comment 11•18 years ago
|
||
Comment on attachment 235504 [details] [diff] [review]
initialize windows before restoring them
Dietrich: What happens when restoreWindow is called before the expected onLoad call?
AFAICT: onLoad is called now and it will be called later again - thus overwriting the window's __SSi which will effectively clear the list of recently closed tabs and all other data directly added to _windows[aWindow.__SSi]. You'll thus have to add the same check to onLoad as well.
Updated•18 years ago
|
Whiteboard: [baking][needs a] → [need response to comment #11]
Comment 12•18 years ago
|
||
I guess that this patch hasn't landed yet, because I still see the problem with todays nightly ( Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1b2) Gecko/20060828 BonEcho/2.0b2 ).
P.S. This bug is really annoying and discouraging for testers, because we lose the contents of other windows if we had >1 open before the update.
Comment 13•18 years ago
|
||
This addresses Simon's comment by not initializing windows that have already been initialized.
Attachment #235779 -
Flags: review?(mconnor)
Attachment #235779 -
Flags: approval1.8.1?
Updated•18 years ago
|
Whiteboard: [need response to comment #11] → [needs review mconnor]
Comment 14•18 years ago
|
||
Comment on attachment 235779 [details] [diff] [review]
add window initialization check to onLoad
r+a=me for this, let's get these landed
Attachment #235779 -
Flags: review?(mconnor)
Attachment #235779 -
Flags: review+
Attachment #235779 -
Flags: approval1.8.1?
Attachment #235779 -
Flags: approval1.8.1+
Updated•18 years ago
|
Attachment #235504 -
Flags: approval1.8.1? → approval1.8.1+
Updated•18 years ago
|
Whiteboard: [needs review mconnor] → [checkin needed(1.8.1)]
Comment 15•18 years ago
|
||
Will this also restore the list of Closed Tabs if the user has selected the option of restoring his session (tabs and windows) when starting Firefox. Its the expected behavior.
If not, should I file a separate bug for the same?
Assignee | ||
Comment 16•18 years ago
|
||
(In reply to comment #15)
This patch indeed also restores the list when resuming a session regularly (without a crash).
Updated•18 years ago
|
Keywords: fixed1.8.1
Whiteboard: [checkin needed(1.8.1)]
Updated•18 years ago
|
Component: General → Session Restore
Updated•18 years ago
|
QA Contact: general → session.restore
You need to log in
before you can comment on or make changes to this bug.
Description
•