[Session Manager] Session Manager API

NEW
Unassigned

Status

()

Firefox
Session Restore
5 years ago
4 years ago

People

(Reporter: Yoric, Unassigned)

Tracking

(Depends on: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Design and implement an API that may be used to obtain the current state of the session (windows, tabs, history, forms, dom session store, scrolling position, etc.) for the following purposes:
- saving the current session to disk, e.g. for data recovery;
- extracting data that may be sent across the wire, e.g. for Sync;
- additional manipulation by add-ons.
We desire the following properties from this API:
- asynchronous;
- well-documented (e.g. no returning "JSON blobs);
- suited for a fast implementation;
- minimal.
Depends on: 833792
Depends on: 833794
Created attachment 705376 [details]
Early draft

I am really not satisfied with this draft, but let's give it a try.
Attachment #705376 - Flags: feedback?(ttaubert)
It would be helpful if you can use MessageManager to communicate with the content window so we can use this in B2G and other things that might need session restore and use e10s.
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #3)
> It would be helpful if you can use MessageManager to communicate with the
> content window so we can use this in B2G and other things that might need
> session restore and use e10s.

That means we'd have a session manager content script in every browser window that listens for messages and restores a given state or returns the current one. Sounds reasonable to me.
It sounds less reasonable to me when you put it that way :-).

If you need to monitor pretty much all form control state changes, maybe your API should be baked into Gecko.
Comment on attachment 705376 [details]
Early draft

Seems like a big rewrite is currently off the table to grab some lower hanging fruits in combination with progressing towards e10s compatibility.
Attachment #705376 - Flags: feedback?(ttaubert)
You need to log in before you can comment on or make changes to this bug.