[meta][SessionStore] Clean up and document session restore

NEW
Unassigned

Status

()

Firefox
Session Restore
4 years ago
a year ago

People

(Reporter: Yoric, Unassigned)

Tracking

(Depends on: 4 bugs, {addon-compat, meta})

Firefox Tracking Flags

(Not tracked)

Details

The state of Session Restore contains a number of fragile and undocumented fields. Opening this bug to track cleanups.
Depends on: 868026
Depends on: 869900
Depends on: 867097
Depends on: 873771
Depends on: 867143
Keywords: addon-compat
Depends on: 867142
Depends on: 874817

Updated

4 years ago
Blocks: 866499
Depends on: 867118

Comment 1

4 years ago
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?
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.
(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.
(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.
In our various patches, we are using WeakMap for this kind of use. Would this work for you, morac?
(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.
(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.
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.
Depends on: 894969
Depends on: 668011

Updated

4 years ago
Depends on: 961641
Keywords: meta
You need to log in before you can comment on or make changes to this bug.