Provide some GC reasons for embedders to use
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
People
(Reporter: jonco, Assigned: jonco)
Details
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
We used to have some reserved GC reasons for this purpose but we gradually used them all up. At the moment embedders seem to be using Firefox-specific reasons, which has the risk that they will trigger some special behaviour that they didn't intend.
The current behaviours that we attach to reasons are:
- MEM_PRESSURE and USER_INACTIVE: always compact in shrinking GCs, even if animating or incremental
- anything with SHUTDOWN in it may be treated specially, e.g. by trying harder to clean everything up
- they zeal mode test function deterministicgc() can disable certain GC reasons from running based on whether the reason is one that is triggered deterministically
We should add some reserved reasons for embedders that we don't attach special meanings too.
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4a4059ea960e Provide some GC reasons for embedders to use r=sfink
Comment 3•3 years ago
|
||
bugherder |
Comment 4•3 years ago
|
||
Comment on attachment 9232332 [details]
Bug 1721549 - Provide some GC reasons for embedders to use r?sfink
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Allows embedders to avoid subtle bugs, so should go into the ESR that embedders target.
- User impact if declined: Embedders might find subtle GC bugs when defining their own GC reasons to override Firefox's GC reasons, since some of those are treated specially by the JS engine.
- Fix Landed on Version: 92
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Firefox doesn't use these embedder-only definitions.
- String or UUID changes made by this patch: None.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Since this would be useful let's add it.
Updated•3 years ago
|
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e6d843aac93 Add JS::GCReason::FIRST_RESERVED_REASON r=sfink
Comment 7•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 8•3 years ago
|
||
Comment on attachment 9232332 [details]
Bug 1721549 - Provide some GC reasons for embedders to use r?sfink
NPOTB for Firefox, helpful for embedders. Approved for 91.0esr RC2.
Updated•3 years ago
|
Comment 9•3 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-esr91/rev/022a3c12934e
https://hg.mozilla.org/releases/mozilla-esr91/rev/5932e0b62343
Description
•