Open Bug 1812231 Opened 2 years ago Updated 10 months ago

waitForBackgroundTask is easy to misunderstand

Categories

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

task

Tracking

()

ASSIGNED

People

(Reporter: pbone, Assigned: pbone)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

SliceBudgets can't be both unlimited and time budgets. So these three lines of code that create a deadline for .join() are dead. Which is good because now we know that the task is definitly complete when .join() returns and the code that follows it makes sense.

https://searchfox.org/mozilla-central/source/js/src/gc/GC.cpp#3735-3737

Type: task → defect
Summary: Remove misleading dead code in waitForBackgroundTask → Fix edge-cases in waitForBackgroundTask

An incremental GC that set shouldPauseMutator=true could enter both if
statements and would end up taking the lock a second time unnecessarily.
This patch makes these branches exclusive and complete.

Depends on D167767

Blocks: 1809610
Severity: -- → S3
Priority: -- → P1

The following patches are waiting for review from a reviewer who resigned from the review:

ID Title Author Reviewer Status
D167767 Bug 1812231 - Remove dead code deadline calcuation r=jonco pbone jonco: Resigned from review
D167768 Bug 1812231 - Simplify branches and avoid taking a lock twice r=jonco pbone jonco: Resigned from review

:pbone, could you please find another reviewer?

For more information, please visit auto_nag documentation.

Flags: needinfo?(pbone)
Attachment #9313948 - Attachment is obsolete: true
Type: defect → task
Flags: needinfo?(pbone)
Summary: Fix edge-cases in waitForBackgroundTask → waitForBackgroundTask is easy to misunderstand
No longer blocks: 1809610
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: