Bug 1518138 - Make RunNextCollectorTimer trigger full GCs to address out of memory errors running JS reftests r=smaug

This doesn't fix the underlying problem but makes RunNextCollectorTimer more aggressive in what it does. Testing shows this substantially reduces the max GC heap size while running these tests as well as vsize and RSS. Hopefully this will fix the problem with the tests failing while we work out a good solution for the underlying issue.

Differential Revision: https://phabricator.services.mozilla.com/D44378

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jon Coppeard 2019-09-03 12:21:45 +00:00
Родитель 7cd233a725
Коммит 335ff4bf5d
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1906,6 +1906,11 @@ void nsJSContext::RunNextCollectorTimer(JS::GCReason aReason,
}
if (sGCTimer) {
if (aReason == JS::GCReason::DOM_WINDOW_UTILS) {
// Force full GCs when called from reftests so that we collect dead zones
// that have not been scheduled for collection.
sNeedsFullGC = true;
}
GCTimerFired(nullptr, reinterpret_cast<void*>(aReason));
return;
}