Closed Bug 833794 Opened 11 years ago Closed 10 years ago

[Session Manager] Session State Notification API

Categories

(Firefox :: Session Restore, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: Yoric, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Design and implement a well-defined manner of informing the Session Manager (and whichever other components that may need it) that meaningful information has changed and should therefore be recorded.
Attached patch First draft (obsolete) — Splinter Review
Attaching a first draft, as a request for comment.
Attachment #706028 - Flags: feedback?(ttaubert)
Attachment #706028 - Flags: feedback?(rnewman)
Attachment #706028 - Flags: feedback?(felipc)
Attached file First draft, v2
Almost the same draft, but with better documentation.
Attachment #706028 - Attachment is obsolete: true
Attachment #706028 - Flags: feedback?(ttaubert)
Attachment #706028 - Flags: feedback?(rnewman)
Attachment #706028 - Flags: feedback?(felipc)
Attachment #706297 - Flags: feedback?(ttaubert)
Attachment #706297 - Flags: feedback?(rnewman)
Attachment #706297 - Flags: feedback?(felipc)
Comment on attachment 706297 [details]
First draft, v2

I guess there are two questions here:

* What does this buy over the existing observer notification framework?
* Why is SessionNotification -- which appears to be a clearing house for translating a set of events into another set of events -- not simply a part of the session manager? After all, performing session management actions, updating storage, and reflecting appropriate changes back to the rest of the system is what the session manager does, right?
Attachment #706297 - Flags: feedback?(rnewman)
(In reply to Richard Newman [:rnewman] from comment #3)
> Comment on attachment 706297 [details]
> First draft, v2
> 
> I guess there are two questions here:
> 
> * What does this buy over the existing observer notification framework?

This buys:
- Observing past events.
- Collapsing of consecutive events.
- Possibly (not documented in this API yet) throttling of events (i.e. don't inform observers of every single history change, wait for 5 seconds).
- If we decide to divide the Session Manager in several components, ensuring that we only send trivial messages between components, not complicated DOM objects, with their wrappers, etc.

> * Why is SessionNotification -- which appears to be a clearing house for
> translating a set of events into another set of events -- not simply a part
> of the session manager? After all, performing session management actions,
> updating storage, and reflecting appropriate changes back to the rest of the
> system is what the session manager does, right?

It is meant to be a part of Session Manager. Since it can be implemented separately and since it can possibly be useful to other features/add-ons, I went for modularizing it away.
Comment on attachment 706297 [details]
First draft, v2

Seems like a big rewrite is currently off the table to grab some lower hanging fruits in combination with progressing towards e10s compatibility.
Attachment #706297 - Flags: feedback?(ttaubert)
Attachment #706297 - Flags: feedback?(felipc)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
e10s is now ready. Can this bug be solved now?
e10s is now ready. Can this bug be solved now?
Flags: needinfo?(dteller)
Flags: needinfo?(dteller) → needinfo?(mdeboer)
Robert, I don't see what you mean here - this bug is already closed. We now have the https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/sessions API and if you'd like to see the 'onChanged' notification extended, please file a new bug in the WebExtensions bugzilla component. Thanks!
Flags: needinfo?(mdeboer)
No longer blocks: Session_managers
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: