Bug 1562187 - (part 4) Move an assertion to it makes more sense r=jandem

Move this assertion so it's nearer to where its assuption is used.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Paul Bone 2019-07-10 08:55:56 +00:00
Родитель 492004b6d3
Коммит eb77b16ecc
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -1229,12 +1229,12 @@ void js::Nursery::clear() {
chunk(currentChunk_)
.poisonAfterEvict(position() - chunk(currentChunk_).start());
}
MOZ_ASSERT(maxChunkCount() > 0);
/*
* Reset the start chunk & position if we're not in this zeal mode, or we're
* in it and close to the end of the nursery.
*/
MOZ_ASSERT(maxChunkCount() > 0);
if (!runtime()->hasZealMode(ZealMode::GenerationalGC) ||
(runtime()->hasZealMode(ZealMode::GenerationalGC) &&
currentChunk_ + 1 == maxChunkCount())) {