Closed
Bug 1961816
Opened 28 days ago
Closed 22 days ago
Microtasks posted from a direct macOS event don't run until an arbitrary checkpoint inside a gecko event.
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
140 Branch
Tracking | Status | |
---|---|---|
firefox140 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
(Whiteboard: [viewtransitions:m1])
Attachments
(2 files)
This is the root cause of bug 1960926. The TLDR is:
- The macOS event set-up doesn't use Gecko events.
- That gets us to run random JS (mouseup events and so on) with a RecursionDepth() of zero.
- That makes microtask checkpoints not run here (because 0 >= 0).
- That causes the microtasks to run basically on whatever arbitrary microtask checkpoint happens inside a Gecko task, which in bug 1960926 was the nsRefreshDriver animation checkpoint.
I think the code in RunMicrotaskCheckpoints should be more robust, but ideally we also fix that the event nesting level issue.
Assignee | ||
Comment 1•28 days ago
|
||
Account for native event loop nesting level.
Updated•28 days ago
|
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•28 days ago
|
||
Assignee | ||
Updated•28 days ago
|
Summary: Microtasks posted from a direct macOS event don't run. → Microtasks posted from a direct macOS event don't run until an arbitrary checkpoint inside a gecko event.
Comment 3•28 days ago
|
||
Emilio, thanks for working on the regression in bug 1961816 - should this have tracking to get this fix into 139 along with bug 1960926?
Flags: needinfo?(emilio)
Assignee | ||
Comment 4•28 days ago
|
||
No, this should land after the freeze, it's a bit riskier change.
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/152a0c0ed6c4
Run microtask checkpoints on direct widget events correctly. r=smaug
Comment 6•22 days ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 22 days ago
status-firefox140:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
Updated•21 days ago
|
Whiteboard: [viewtransitions:m1]
You need to log in
before you can comment on or make changes to this bug.
Description
•