Closed Bug 1753958 Opened 3 years ago Closed 3 years ago

GC dependence on reason codes is surprising

Categories

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

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(3 files)

Currently the GC behaves differently depending on the trigger reason (e.g. for shutdown GCs). This is pretty surprising. We should make this behaviour explicit by requiring the caller to pass an option rather than interpreting the reason code.

See Also: → 1749298
Assignee: nobody → jcoppeard

This removes the ugly passing around of MaybeGCOptions which didn't end up up
working out that well.

We now set the options when we start a GC. They're stored as a maybe and we
assert they are set during incremental GC and clear then at the end.

This also makes the method assert if called outside and incremental GC rather
than always returning false.

Depends on D138553

Attachment #9263518 - Attachment description: Bug 1753958 - Use isShrinkingGC() method rather than checking the options directly r?sfink → Bug 1753958 - Part 2: Use isShrinkingGC() method rather than checking the options directly r?sfink
Attachment #9263519 - Attachment description: Bug 1753958 - Add a GCOption for shutdown GCs and use this rather than checking the GCReason r?sfink,mccr8 → Bug 1753958 - Part 3: Add a GCOption for shutdown GCs and use this rather than checking the GCReason r?sfink,mccr8
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c17e98d44b5b
Part 1: Refactor handling of GCOptions r=sfink
https://hg.mozilla.org/integration/autoland/rev/f940de51af34
Part 2: Use isShrinkingGC() method rather than checking the options directly r=sfink
https://hg.mozilla.org/integration/autoland/rev/3d9247af11fa
Part 3: Add a GCOption for shutdown GCs and use this rather than checking the GCReason r=sfink,mccr8
Regressions: 1755693
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: