Closed Bug 1862244 Opened 2 years ago Closed 2 years ago

Add a main thread shutdown observer similar to WorkerRef

Categories

(Core :: DOM: Streams, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox-esr115 --- fixed
firefox121 --- fixed
firefox122 --- fixed

People

(Reporter: saschanaz, Assigned: saschanaz)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

... although it will not have the ability to delay the shutdown.

Some observation on the current 6 subscribers of DOM_WINDOW_DESTROYED_TOPIC:

  1. Most of the observers also subscribe _FROZEN_TOPIC too. Looks reasonable to me as pages behind bfcache probably should stop consuming network resource etc. Exceptions are nsTypeAheadFind which is not network related, and JSStreamConsumer which I don't really understand.
  2. Only some of them cares about workers.
    • BodyConsumer
    • JSStreamConsumer, somehow it has a special setup with WindowStreamOwner and WorkerStreamOwner. (TIL about JSStreamConsumer. It seems it's to consume Response but I don't immediately see the purpose 🤔)

Andrew, do you know whether there's any other mainthread shutdown observing way I should be aware of?

Flags: needinfo?(bugmail)
Attachment #9361251 - Attachment description: WIP: Bug 1862244 - Add MainThreadShutdownObserver → Bug 1862244 - Add MainThreadShutdownObserver r=asuth
Attachment #9361251 - Attachment description: Bug 1862244 - Add MainThreadShutdownObserver r=asuth → Bug 1862244 - Add WindowGlobalShutdownObserver r=asuth
Attachment #9361251 - Attachment description: Bug 1862244 - Add WindowGlobalShutdownObserver r=asuth → Bug 1862244 - Add WindowGlobalTeardownObserver r=asuth
Attachment #9361251 - Attachment is obsolete: true
Attachment #9363060 - Attachment description: WIP: Bug 1862244 - Add GlobalTeardownHelper r=smaug → Bug 1862244 - Add GlobalTeardownHelper r=smaug
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch

Comment on attachment 9363060 [details]
Bug 1862244 - Add GlobalTeardownHelper r=smaug

Needed for bug 1849860. Approved for 121.0b4.

Attachment #9363060 - Flags: approval-mozilla-beta+
Attachment #9366333 - Flags: approval-mozilla-esr115?

Comment on attachment 9366333 [details]
Bug 1862244 - Add GlobalTeardownHelper r=smaug

Approved for 115.6esr.

Attachment #9366333 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+

I don't need any needinfo here anymore.

Flags: needinfo?(bugmail)
Duplicate of this bug: 1456893
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: