Bug 1548223 - Don't assert in Realm's destructor if we have shutdown GC leaks. r=jonco

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan de Mooij 2019-05-02 11:35:52 +00:00
Родитель 3a6c1c6a49
Коммит 9818272c76
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -66,9 +66,10 @@ Realm::~Realm() {
runtime_->lcovOutput().writeLCovResult(lcovOutput); runtime_->lcovOutput().writeLCovResult(lcovOutput);
} }
// We cannot have a debuggee realm here so we don't have to call // We can have a debuggee realm here only if we are destroying the runtime and
// runtime->decrementNumDebuggeeRealms(). // leaked GC things.
MOZ_ASSERT(!isDebuggee()); MOZ_ASSERT_IF(runtime_->gc.shutdownCollectedEverything(), !isDebuggee());
unsetIsDebuggee();
MOZ_ASSERT(runtime_->numRealms > 0); MOZ_ASSERT(runtime_->numRealms > 0);
runtime_->numRealms--; runtime_->numRealms--;