Closed Bug 528451 Opened 16 years ago Closed 16 years ago

sessionstore-browser-state-restored is not reliable regarding closed windows

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3.7a1
Tracking Status
status1.9.2 --- beta4-fixed

People

(Reporter: mak, Assigned: mak)

References

Details

Attachments

(1 file)

sessionstore-browser-state-set fires after setBrowserState finishes, but at that point windows are still closing, so the browser state is only partially set. PrivateBrowsing will wait for this notification before starting, and some test do the same, so i think it should not lie, and fire only when the state has been really set (all windows that should be open are open, all windows that should be closed are closed).
Blocks: 527074
Blocks: 526613
Blocks: 528452
Attached patch patch v1.0Splinter Review
Attachment #412178 - Flags: review?(zeniko)
Attachment #412178 - Flags: review?(paul)
Attachment #412178 - Flags: review?(paul)
Comment on attachment 412178 [details] [diff] [review] patch v1.0 paul is busy with blockers, removing request to him.
Summary: sessionstore-browser-state-set is not reliable → sessionstore-browser-state-set is not reliable regarding closed windows
No longer blocks: 527074
(In reply to comment #0) > (all windows that should be open are open, all windows that > should be closed are closed). Isn't that already the case (with the exception of the window mediator still keeping track of closed windows for a few further cycles)? And in what cases is the difference between "some windows still closing" and "all closing windows gone" relevant? Could this affect Private Browsing or tests not using the window mediator?
(In reply to comment #3) > And in what cases is the difference between "some windows still closing" and > "all closing windows gone" relevant? Could this affect Private Browsing or > tests not using the window mediator? If there are some windows that are still closing, and the sessionstore component keeps track of those windows, when we switch the private browsing mode, the state of those windows will be saved, and they will be restored later when exiting that mode. The effect of this from a user's perspective is that they see a window that they had closed come back after exiting the private browsing mode, which is definitely not the behavior that we want. Please note the correlation between when sessionstore-browser-state-set is fired and whether sessionstore keeps track of windows for which the closed property is true (bug 528440).
Blocks: 526194
This bug can affect the fix of bug 526194, which is a 3.6 blocker, so I think this should also block the release of Firefox 3.6.
Flags: blocking-firefox3.6?
(In reply to comment #4) > If there are some windows that are still closing, and the sessionstore > component keeps track of those windows, when we switch the private browsing > mode, the state of those windows will be saved, and they will be restored later > when exiting that mode. The effect of this from a user's perspective is that > they see a window that they had closed come back after exiting the private > browsing mode, which is definitely not the behavior that we want. I don't think we're talking about seconds here, so I don't think a user can close a window and enter private browsing while that window is still in the intermediate non-destroyed state.
(In reply to comment #6) > (In reply to comment #4) > > If there are some windows that are still closing, and the sessionstore > > component keeps track of those windows, when we switch the private browsing > > mode, the state of those windows will be saved, and they will be restored later > > when exiting that mode. The effect of this from a user's perspective is that > > they see a window that they had closed come back after exiting the private > > browsing mode, which is definitely not the behavior that we want. > > I don't think we're talking about seconds here, so I don't think a user can > close a window and enter private browsing while that window is still in the > intermediate non-destroyed state. Oh, they can. This is almost what bug 526194 is about...
Can you please CC me there?
(In reply to comment #8) > Can you please CC me there? Of course. Sorry I forgot that you can't see that bug...
(In reply to comment #4) > Please note the correlation between when sessionstore-browser-state-set is > fired and whether sessionstore keeps track of windows for which the closed > property is true (bug 528440). So with bug 528440 fixed, this issue becomes moot, then? Else, please also CC me on bug 526194.
(In reply to comment #10) > (In reply to comment #4) > > Please note the correlation between when sessionstore-browser-state-set is > > fired and whether sessionstore keeps track of windows for which the closed > > property is true (bug 528440). > > So with bug 528440 fixed, this issue becomes moot, then? Else, please also CC > me on bug 526194. I guess not, but I'll CC you on that bug anyway.
Sigh, the ever growing blocker tree from bug 526194 ...
Flags: blocking-firefox3.6? → blocking-firefox3.6+
blockers without owners are insane, taking for now.
Assignee: nobody → mak77
Comment on attachment 412178 [details] [diff] [review] patch v1.0 r+=me with one nit fixed: Please compare array lengths against numbers instead of evaluating them as boolean expressions (i.e. "!a.length" should be "a.length == 0" and "a.length" should be "a.length > 0").
Attachment #412178 - Flags: review?(zeniko) → review+
Can we get this in and closed off?
Whiteboard: [can land[
Whiteboard: [can land[ → [can land]
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
Comment on attachment 412178 [details] [diff] [review] patch v1.0 >+ var self = this; >+ // close all other browser windows >+ this._forEachBrowserWindow(function(aWindow) { >+ if (aWindow != window) { >+ self._closingWindows.push(aWindow); >+ aWindow.close(); >+ } >+ }); You can use 'this' inside of the callback.
Whiteboard: [can land]
Summary: sessionstore-browser-state-set is not reliable regarding closed windows → sessionstore-browser-state-restored is not reliable regarding closed windows
Blocks: 558637
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: