Last Comment Bug 633722 - Port Bug 615394 [Session Restore should notify when it is beginning and ending a restore]
: Port Bug 615394 [Session Restore should notify when it is beginning and endin...
Product: SeaMonkey
Classification: Client Software
Component: Session Restore (show other bugs)
: Trunk
: All All
-- normal (vote)
: seamonkey2.1b3
Assigned To: Misak Khachatryan
Depends on: 615394
  Show dependency treegraph
Reported: 2011-02-12 04:05 PST by Misak Khachatryan
Modified: 2011-02-16 04:55 PST (History)
1 user (show)
bugzillamozillaorg_serge_20140323: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

patch (24.12 KB, patch)
2011-02-12 04:05 PST, Misak Khachatryan
neil: review+
Details | Diff | Splinter Review

Description User image Misak Khachatryan 2011-02-12 04:05:14 PST
Created attachment 511946 [details] [diff] [review]

From parent bug:

This should cover setWindowState, as well as other restore triggers. This is
necessary for Panorama to properly handle session restore. We need this sooner
than later, as it blocks a number of Panorama bugs.

So we really want to make it clear when we're adding/replacing state.

This can be done via restoreLastSession, setBrowserState, setWindowState,
setTabState, duplicateTab, undoCloseTab, undoCloseWindow.

Of those, restoreLastSession & setBrowserState will send
sessionstore-browser-state-restored when finished.

setWindowState will fire SSTabRestoring on each tab it's restoring.
setTabState, undoCloseTab, duplicateTab should also be firing a single

undoCloseWindow will open a new window so doesn't actually matter to Panorama
right now.

So what I'm thinking right now is that we fire an event on the window when we
start modifying state then fire another event indicating that we're ready for
that state to be inspected/modified. Something like SSWindowStateBusy and

That might be a bit too much of a wide angle approach, but I think it achieves
what we want and is enough for Panorama to know not to just start doing things
on TabOpen.
Comment 1 User image 2011-02-15 08:51:30 PST
Comment on attachment 511946 [details] [diff] [review]

>+  _sendWindowStateEvent: function sss__sendWindowStateEvent(aWindow, aType) {
At some point I'm going to regret asking for single underscores.
But not just yet ;-)
Comment 2 User image Misak Khachatryan 2011-02-15 22:32:25 PST
Pushed with nit fixed:

Note You need to log in before you can comment on or make changes to this bug.