Bug 1731564: Use motivated SpinEventLoopUntil inside modules/*. r=Gijs,KrisWright

Depends on D127230

Differential Revision: https://phabricator.services.mozilla.com/D127231
This commit is contained in:
Jens Stutte 2021-10-06 19:45:15 +00:00
Родитель 3cbb575b9e
Коммит 09fbcfad19
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -2971,7 +2971,8 @@ class PreferencesWriter final {
// event loop. Given that PWRunnable generally runs on a thread pool,
// if we're stuck here, it's likely because of PreferencesWriter::Write
// and not some other runnable. Thus, spin away.
mozilla::SpinEventLoopUntil([]() { return sPendingWriteCount <= 0; });
mozilla::SpinEventLoopUntil("PreferencesWriter::Flush"_ns,
[]() { return sPendingWriteCount <= 0; });
}
// This is the data that all of the runnables (see below) will attempt