Last Comment Bug 874381 - [meta][SessionStore] Clean up and document session restore
: [meta][SessionStore] Clean up and document session restore
Status: NEW
: addon-compat, meta
Product: Firefox
Classification: Client Software
Component: Session Restore (show other bugs)
: unspecified
: All All
: -- normal with 6 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on: 668011 867142 869900 961641 867097 867118 867143 868026 873771 874817 894969
Blocks: 866499
  Show dependency treegraph
 
Reported: 2013-05-21 03:26 PDT by David Teller [:Yoric] (please use "needinfo")
Modified: 2016-06-10 10:41 PDT (History)
35 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description David Teller [:Yoric] (please use "needinfo") 2013-05-21 03:26:25 PDT
The state of Session Restore contains a number of fragile and undocumented fields. Opening this bug to track cleanups.
Comment 1 YUKI "Piro" Hiroshi 2013-05-28 00:58:55 PDT
Some "__SS_*" properties still there.

 * window.__SSi
 * window.__SS_restoreID
 * window.__SS_tabsToRestore
 * window.__SS_lastSessionWindowID
 * tab.linkedBrowser.__SS_restore_data
 * tab.linkedBrowser.__SS_restore_pageStyle
 * tab.linkedBrowser.__SS_restore_tab
 * tab.linkedBrowser.__SS_formDataSaved
 * tab.linkedBrowser.__SS_hostSchemeData
 * tab.linkedBrowser.__SS_broken_history
 * tab.linkedBrowser.__SS_extdata
 * tab.linkedBrowser.__SS_shistoryListener

Are there existing bugs for them?
Comment 2 Michael Kraft [:morac] 2013-05-28 04:12:40 PDT
My addon uses windows.__SSi to match session data to it's associated window.  If that is removed, there should be some way to still get that value.
Comment 3 David Teller [:Yoric] (please use "needinfo") 2013-05-28 04:41:57 PDT
(In reply to YUKI "Piro" Hiroshi from comment #1)
> Some "__SS_*" properties still there.

We'll open bugs progressively.

(In reply to Michael Kraft [:morac] from comment #2)
> My addon uses windows.__SSi to match session data to it's associated window.
> If that is removed, there should be some way to still get that value.

I don't understand your sentence. What are you matching, exactly?
Note that __SSi will not disappear immediately – actually, it might be the last one to disappear.
Comment 4 Michael Kraft [:morac] 2013-05-28 04:49:49 PDT
(In reply to David Rajchenbach Teller [:Yoric] from comment #3)
> I don't understand your sentence. What are you matching, exactly?
> Note that __SSi will not disappear immediately – actually, it might be the
> last one to disappear.

I use it as a window identifier since it's always set and unique, in addition to matching Windows to window session data. I suppose I can create my own unique window identifier though.
Comment 5 David Teller [:Yoric] (please use "needinfo") 2013-05-28 04:51:12 PDT
In our various patches, we are using WeakMap for this kind of use. Would this work for you, morac?
Comment 6 Michael Kraft [:morac] 2013-05-28 04:53:59 PDT
(In reply to David Rajchenbach Teller [:Yoric] from comment #5)
> In our various patches, we are using WeakMap for this kind of use. Would
> this work for you, morac?

As long as it's readable and set and cleared properly, that will work.
Comment 7 Tim Taubert [:ttaubert] 2013-05-28 04:56:15 PDT
(In reply to Michael Kraft [:morac] from comment #6)
> (In reply to David Rajchenbach Teller [:Yoric] from comment #5)
> > In our various patches, we are using WeakMap for this kind of use. Would
> > this work for you, morac?
> 
> As long as it's readable and set and cleared properly, that will work.

I think David was saying that you might want to look into using this inside your add-on to map data to windows. We might end up using this in SessionStore too but we would not want to expose it unless really necessary.
Comment 8 Tim Taubert [:ttaubert] 2013-05-28 04:58:34 PDT
Anyway, please let's not turn this into a discussion forum. This is a meta bug for tracking progress. Once we attack __SSi we can deal with details in the specific bug and can handle bigger discussions on the mailing lists.

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