зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1538594 - Fix disabling the nursery r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D25715 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6db1bbd9b8
Коммит
d118d7b441
|
@ -860,12 +860,6 @@ void js::Nursery::collect(JS::GCReason reason) {
|
|||
if (rt->gc.heapSize.gcBytes() >= tunables().gcMaxBytes()) {
|
||||
disable();
|
||||
}
|
||||
// Disable the nursery if the user changed the configuration setting. The
|
||||
// nursery can only be re-enabled by resetting the configurationa and
|
||||
// restarting firefox.
|
||||
if (chunkCountLimit_ == 0) {
|
||||
disable();
|
||||
}
|
||||
|
||||
endProfile(ProfileKey::Total);
|
||||
rt->gc.incMinorGcNumber();
|
||||
|
@ -1219,6 +1213,14 @@ void js::Nursery::maybeResizeNursery(JS::GCReason reason) {
|
|||
}
|
||||
|
||||
bool js::Nursery::maybeResizeExact(JS::GCReason reason) {
|
||||
// Disable the nursery if the user changed the configuration setting. The
|
||||
// nursery can only be re-enabled by resetting the configuration and
|
||||
// restarting firefox.
|
||||
if (tunables().gcMaxNurseryBytes() == 0) {
|
||||
disable();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Shrink the nursery to its minimum size of we ran out of memory or
|
||||
// received a memory pressure event.
|
||||
if (gc::IsOOMReason(reason)) {
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
// This disables the nursery.
|
||||
gcparam('maxNurseryBytes', 0);
|
||||
|
||||
assertEq(gcparam('maxNurseryBytes'), 0);
|
||||
gc();
|
||||
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче