Check if nsGlobalWindowInner::ExecuteIdleRequest should refuse requests when ProcessChild::ExpectingShutdown
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
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.
Reporter | ||
Comment 1•9 months ago
•
|
||
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.
Reporter | ||
Comment 2•9 months ago
|
||
Let's see if doing this breaks something obvious.
Reporter | ||
Comment 3•9 months ago
|
||
Updated•9 months ago
|
Comment 4•9 months ago
|
||
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?
Reporter | ||
Comment 5•9 months ago
•
|
||
(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.
Reporter | ||
Comment 6•9 months ago
|
||
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...
Updated•9 months ago
|
Reporter | ||
Updated•9 months ago
|
Description
•