Open Bug 833791 Opened 7 years ago Updated 15 days ago

[Session Manager] Session Manager API

Categories

(Firefox :: Session Restore, defect)

x86
macOS
defect
Not set

Tracking

()

People

(Reporter: Yoric, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

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.
Attached file 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)
See Also: → 1378651
See Also: → 1381922
You need to log in before you can comment on or make changes to this bug.