Open Bug 1762092 Opened 3 years ago Updated 3 years ago

Prototype an opt-in MessagePort close/onclose event for the system principal and conditionally enabled via preference for testing

Categories

(Core :: DOM: postMessage, enhancement)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: asuth, Assigned: asuth)

References

()

Details

On the pine branch we have some system principal uses of SharedWorker where the lack of close events is causing resource leaks as the SharedWorker can't tell when its clients have gone away (without some kind of heartbeat mechanism). There is a very long history for a proposal of notifications reaching all the way back to the days of Firefox OS. https://github.com/whatwg/html/issues/1766 has tracked the proposal and I revived it slightly at https://github.com/whatwg/html/issues/1766#issuecomment-960328593

The current plan here is:

  1. Prototype a "close" event implementation on this bug.
  • Exposure to be content will be gated by a preference but the functionality will always be available to the system principal. The preference will exist at this point only for testing purposes.
  • WPTs will be created and placed in the Mozilla-specific sub-tree so that they are not synchronized upstream.
  • This will land and be merged to pine for pine's benefit.
  1. Draft a spec PR consistent with the changes and the tests, likely involving a bunch of iteration. Ensure consensus, then pursue shipping the change with any appropriate procedural steps, which would mean enabling the pref for content and moving the WPTs to the synced directory.
Summary: Prototype an opt-in close event for the system principal and conditionally enabled via preference for testing → Prototype an opt-in MessagePort close/onclose event for the system principal and conditionally enabled via preference for testing
You need to log in before you can comment on or make changes to this bug.