scheduler.postTask() with a delay queues the task at an arbitrary priority
Categories
(Core :: DOM: Performance APIs, defect)
Tracking
()
People
(Reporter: jstutte, Assigned: jstutte)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 external file)
The constructor of DelayedWebTaskHandler takes an EventQueuePriority but never stores it, so mPriority is left uninitialized:
When the delay elapses, DelayedWebTaskHandler::Call passes that value to WebTaskScheduler::DispatchTask, so a delayed task's event loop runnable is queued at whatever priority the memory happens to hold rather than the one derived from its TaskPriority. This has been the case since the API was prototyped in bug 1734997.
It went unnoticed because the value is often 0, which currently means Idle, and the task still runs eventually. Bug 2066416 adds a priority below Idle, making 0 mean that one, and its assertion in TaskController::AddTask caught it in /scheduler/post-task-delay.any.html and /scheduler/task-controller-setPriority-delayed-task.any.html, which got the stack backed out.
The fix is to initialize mPriority from aPriority.
| Assignee | ||
Updated•1 month ago
|
Comment 1•1 month ago
|
||
Set release status flags based on info from the regressing bug 1734997
:sefeng211, since you are the author of the regressor, bug 1734997, could you take a look?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•1 month ago
|
||
I'll propose a patch.
| Assignee | ||
Comment 3•1 month ago
|
||
DelayedWebTaskHandler took the priority to dispatch at but never stored it,
so a delayed postTask queued its runnable at whatever priority mPriority
happened to hold.
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Comment 6•1 month ago
|
||
The patch landed in nightly and beta is affected.
:jstutte, please make an uplift decision for beta:
- For beta, nominate the patch for beta uplift approval if the fix should be included in this release, or set
status-firefox159towontfixif the fix can wait for the next release.
See Requesting an Uplift for documentation on how to request an uplift.
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•1 month ago
|
Updated•20 days ago
|
Description
•