Closed
Bug 395488
Opened 17 years ago
Closed 15 years ago
Session restore restores blank windows if Firefox was shut down too quickly
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
VERIFIED
FIXED
Firefox 3.6a1
People
(Reporter: zeniko, Assigned: zeniko)
References
Details
(Keywords: verified1.9.1)
Attachments
(1 file, 4 obsolete files)
13.54 KB,
patch
|
Details | Diff | Splinter Review |
Steps to Reproduce 1. Open at least a dozen windows with non-blank content (the default homepage will do). 2. Set Firefox to resume the session at startup 3. Quit and reopen Firefox 4. Quit again _ASAP_ and reopen Firefox again Actual result: Many if not most windows contain only blank tabs. Expected result: Everything is restored after point 4 as after point 3. See bug 368676 for a 10-line patch to fix this issue.
Comment 1•16 years ago
|
||
so the patch in bug 368676 is not useful?
OS: Windows XP → All
Hardware: PC → All
Assignee | ||
Comment 2•16 years ago
|
||
This also fixes bug 409129 (mostly a DUPE of this one) and bug 451292.
Attachment #335051 -
Flags: review?(dietrich)
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → zeniko
Assignee | ||
Comment 3•16 years ago
|
||
Minor change: We first save 500ms after restoring the session at startup so that the new about:sessionrestore has time to store the data of the crashed session in a text field (else we might not allow to restore a previously crashed session on consecutive crashes).
Attachment #335051 -
Attachment is obsolete: true
Attachment #342771 -
Flags: review?(dietrich)
Attachment #335051 -
Flags: review?(dietrich)
Assignee | ||
Comment 4•16 years ago
|
||
Minor change: Passing the crashed session state to about:sessionstore through sss_restoreWindow allows us to instantly save afterwards (obsoleting the 500ms delay from comment #3).
Attachment #342771 -
Attachment is obsolete: true
Attachment #342895 -
Flags: review?(dietrich)
Attachment #342771 -
Flags: review?(dietrich)
Assignee | ||
Comment 5•16 years ago
|
||
Attachment #342895 -
Attachment is obsolete: true
Attachment #343051 -
Flags: review?(dietrich)
Attachment #342895 -
Flags: review?(dietrich)
Assignee | ||
Comment 6•16 years ago
|
||
This bug should be fixed for Firefox 3.1, as otherwise we might get people in an endless crashing loop if Firefox crashes before it can update sessionstore.js to tell itself to display about:sessionrestore at the next startup.
Flags: blocking-firefox3.1?
Comment 7•16 years ago
|
||
I'd add that can also hurt if you have some pages that freeze Firefox on startup. Recently I had such pages in my session, consuming 100% cpu until I had to kill the application and the about:sessionrestore page would never show after restarting the browser (indefinitely).
Assignee | ||
Updated•16 years ago
|
Whiteboard: [has patch][needs review dietrich]
Target Milestone: --- → Firefox 3.1
Comment 8•16 years ago
|
||
Comment on attachment 343051 [details] [diff] [review] unbitrotted >@@ -471,61 +482,72 @@ SessionStoreService.prototype = { > /** > * On window close... > * - remove event listeners from tabs > * - save all window data > * @param aWindow > * Window reference > */ > onClose: function sss_onClose(aWindow) { >+ // this window was about to be restored - conserve its original data, if any >+ let isFullyLoaded = !aWindow.__SS_restoreID; >+ if (!isFullyLoaded) { i'd prefer this to be abstracted into a isWindowLoaded(aWindow) method, and used everywhere where you're currently checking for __SS_restoreID. this centralizes implementation, as well as resulting in self-documenting code. r=me otherwise
Attachment #343051 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 9•16 years ago
|
||
Attachment #343051 -
Attachment is obsolete: true
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Whiteboard: [has patch][needs review dietrich]
Target Milestone: Firefox 3.1 → Firefox 3.1b2
Comment 10•16 years ago
|
||
Comment on attachment 345929 [details] [diff] [review] for check-in [Checkin: Comment 10] http://hg.mozilla.org/mozilla-central/rev/957c90a0ee80
Attachment #345929 -
Attachment description: for check-in → for check-in
[Checkin: Comment 10]
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Version: unspecified → Trunk
Assignee | ||
Updated•16 years ago
|
Flags: blocking-firefox3.1?
Comment 11•16 years ago
|
||
I don't know, it's related or not, but i noticed that after checkin and my port of this bug to SeaMonkey, error console outputs "Error: [Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file:///home/misak/workspace/src/suite-opt/mozilla/dist/bin/components/nsSessionStore.js :: sss_saveState :: line 2215" data: no] Source File: file:///home/misak/workspace/src/suite-opt/mozilla/dist/bin/components/nsSessionStore.js Line: 2215", which points to line "stateString.data = oState.toSource();" Here is surrounding code: saveState: function sss_saveState(aUpdateAll) { // if crash recovery is disabled, only save session resuming information if (!this._resume_from_crash && this._loadState == STATE_RUNNING) return; var oState = this._getCurrentState(aUpdateAll); oState.session = { state: this._loadState == STATE_RUNNING ? STATE_RUNNING_STR : STATE_STOPPED_STR, lastUpdate: Date.now() }; if (this._recentCrashes) oState.session.recentCrashes = this._recentCrashes; var stateString = Components.classes["@mozilla.org/supports-string;1"]. createInstance(Components.interfaces.nsISupportsString); stateString.data = oState.toSource(); var observerService = Components.classes["@mozilla.org/observer-service;1"]. getService(Components.interfaces.nsIObserverService); observerService.notifyObservers(stateString, "sessionstore-state-write", ""); // don't touch the file if an observer has deleted all state data if (stateString.data) this._writeFile(this._sessionFile, stateString.data); this._lastSaveTime = Date.now(); }, Also "Error: uncaught exception: 2147500034" happens more frequently.
Assignee | ||
Comment 12•16 years ago
|
||
(In reply to comment #11) That's one of the dependencies of bug 429414 (hopefully fixed by bug 407110).
Comment 14•15 years ago
|
||
backed out, due to bug 462973: http://hg.mozilla.org/mozilla-central/rev/6682e271edff will re-land with the patch in that bug once we have confirmation of the regression.
Updated•15 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•15 years ago
|
Target Milestone: Firefox 3.1b2 → ---
Comment 15•15 years ago
|
||
relanded today, should stick: https://bugzilla.mozilla.org/show_bug.cgi?id=462973#c20
Updated•15 years ago
|
Status: REOPENED → RESOLVED
Closed: 16 years ago → 15 years ago
Resolution: --- → FIXED
Comment 16•15 years ago
|
||
Dietrich, so we need approval for 1.9.1 now or was it only backed-out on trunk?
Target Milestone: --- → Firefox 3.2a1
Assignee | ||
Comment 17•15 years ago
|
||
(In reply to comment #16) This was never backed out of the 1.9.1 branch, only mozilla-central (see comment #14 and bug 462973 comment #17 and following).
Comment 18•15 years ago
|
||
Thanks Simon. I just wanted to have a confirmation here. A FFT testcase for Litmus cannot hurt. Adding flag for now. I'm not able to see it with builds on OS X and Windows: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090310 Minefield/3.2a1pre Ubiquity/0.1.5 ID:20090310030639 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090309 Shiretoko/3.1b4pre ID:20090309020654
Comment 19•15 years ago
|
||
in-litmus+ https://litmus.mozilla.org/show_test.cgi?id=7797
Flags: in-litmus? → in-litmus+
You need to log in
before you can comment on or make changes to this bug.
Description
•