Closed Bug 1880438 Opened 4 months ago Closed 3 months ago

Check if nsGlobalWindowInner::ExecuteIdleRequest should refuse requests when ProcessChild::ExpectingShutdown

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jstutte, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

See the stack from bug 1880427 comment 0. There might be nicer ways than just checking ProcessChild::ExpectingShutdown (like a shutdown blocker and own shutdown flag or some such). But ProcessChild::ExpectingShutdown can be set asynchronously without main thread processing and is the earliest signal we can get, IIRC.

Note that there is no proof from that specific stack that at the moment we entered nsGlobalWindowInner::ExecuteIdleRequest we were already asked to shut down, but it seems advisable to avoid idle processing in such a situation.

See Also: → 1880427
Assignee: nobody → jstutte
Attachment #9380381 - Attachment description: WIP: Bug 1880438 - Make nsGlobalWindowInner::ExecuteIdleRequest refuse to execute requests after ProcessChild::ExpectingShutdown. r?#dom-core-reviewers → Bug 1880438 - Make nsGlobalWindowInner::ExecuteIdleRequest refuse to execute requests after ProcessChild::ExpectingShutdown. r?#dom-core-reviewers
Status: NEW → ASSIGNED

I'm still a bit confused why we want to do anything special with idle tasks, but not other pending tasks (which have been also scheduled by a web page). Is it just because we happened to see idle tasks on a stack?

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #4)

I'm still a bit confused why we want to do anything special with idle tasks, but not other pending tasks (which have been also scheduled by a web page). Is it just because we happened to see idle tasks on a stack?

The assumption was that idle tasks on an inner window are not important enough to ensure they are executed once dispatched. That might be a misconception, though. Most of the requestIdleCallback tasks I've seen seem to fall into this category, FWIW, but it might be an inappropriate shortcut I want to take here.

Is it just because we happened to see idle tasks on a stack?

And yes, there is no real deeper understanding here from my side other than stumbling over these idle callbacks through that stack...

Attachment #9380381 - Attachment is obsolete: true
Assignee: jstutte → nobody
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → WONTFIX
See Also: 1880427
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: