Closed Bug 1602741 Opened 4 years ago Closed 4 years ago

Shell drainJobQueue function may not drain the job queue if FinalizationGroups queue jobs

Categories

(Core :: JavaScript: GC, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

From bug 1587096 comment 8:

The FinalizationGroup cleanup callback may create new jobs, e.g. resolving a promise.
I would expect that if calling drainJobQueue() triggers the CleanupFinalizationGroup job, then it would drain any resulting new microtasks.

It's probably a matter of calling js::RunJobs a second time after MaybeRunFinalizationGroupCleanupTasks in RunShellJobs.

Assignee: nobody → jcoppeard
Priority: -- → P1

Previously this wouldn't drain any jobs queued by FinalizationGroup callbacks.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: