Bug 1666214 - Don't crash if the shutdown already completed when the shutdown timeout event is processed. r=dom-workers-and-storage-reviewers,janv

Differential Revision: https://phabricator.services.mozilla.com/D99066
This commit is contained in:
Simon Giesecke 2020-12-08 13:00:12 +00:00
Родитель bdf993903d
Коммит f21fb24f3f
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -304,7 +304,13 @@ bool Client::InitiateShutdownWorkThreads() {
[](nsITimer* aTimer, void* aClosure) {
auto* const quotaClient = static_cast<Client*>(aClosure);
MOZ_DIAGNOSTIC_ASSERT(!quotaClient->IsShutdownCompleted());
if (quotaClient->IsShutdownCompleted()) {
// Apparently, the shutdown did complete between the timer
// fired and we processed the event. So there's no reason to
// crash, just do nothing.
return;
}
const auto type = TypeToText(quotaClient->GetType());