Closed Bug 415484 Opened 16 years ago Closed 16 years ago

Form data isn't saved at shutdown

Categories

(Firefox :: Session Restore, defect, P1)

defect

Tracking

()

VERIFIED FIXED
Firefox 3 beta3

People

(Reporter: zeniko, Assigned: zeniko)

Details

(Keywords: dataloss, regression)

Attachments

(1 file)

Steps to reproduce:
1. Open a new tab and go to www.google.com
2. Enter a search term
3. Close Firefox (confirming to Save and Quit)
4. Open Firefox again

Expected result:
The search term has been restored.

Actual result:
It's gone.

This still works as expected when closing just the www.google.com tab and reopening it - and it seems to also work on restart (which should be the exact same code path as shutdown).
Flags: blocking-firefox3?
Looks like with quit-application-granted being dispatched later than with Firefox 2.0, we now close the last window first in the shutdown case and run into a bug we've been having since the beginning but hasn't been noticeable so far.

The problem is that we discard the text cache in sss_onClose through sss_onTabRemove before we gather all possible data for the last time. Correcting the order of instructions trivially fixes this issue.

BTW: In the restart case, there are two quit-application-granted notifications - and the first one once again manages to hide the bug...
Assignee: nobody → zeniko
Status: NEW → ASSIGNED
Attachment #301191 - Flags: review?(dietrich)
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox 3 beta3
Data loss is bad. Blocking for beta. :)
Flags: blocking-firefox3? → blocking-firefox3+
Priority: -- → P1
Comment on attachment 301191 [details] [diff] [review]
trivial fix (only code shuffling)

r=me thanks!
Attachment #301191 - Flags: review?(dietrich) → review+
Checking in browser/components/sessionstore/src/nsSessionStore.js;
/cvsroot/mozilla/browser/components/sessionstore/src/nsSessionStore.js,v  <--  nsSessionStore.js
new revision: 1.94; previous revision: 1.93
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment on attachment 301191 [details] [diff] [review]
trivial fix (only code shuffling)

This landed without approval.
Attachment #301191 - Flags: approval1.9b3?
Oops, sorry. Mconnor asked me to land it over IM.
Comment on attachment 301191 [details] [diff] [review]
trivial fix (only code shuffling)

a=beltzner, post-hoc
Attachment #301191 - Flags: approval1.9b3? → approval1.9b3+
Verified with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b3) Gecko/2008020511 Firefox/3.0b3 ID:2008020511
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: