зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1823655: Set IdentityCredentialStorageService.mShuttingDown if the init() is called during shutdown. r=pbz
The mShuttingDown wasn't set in the init() function during shutdown. In this case, we won't register ShutdownBlocker, so we won't flip mShuttingDown. This could case shutdown hanging becasue WaitForInitialization() could be called during shutdown becasue of sanitizer. We need to flip mShuttingDown to prevent waiting in WaitForInitialization. Differential Revision: https://phabricator.services.mozilla.com/D174212
This commit is contained in:
Родитель
029d2f8315
Коммит
24deee83f7
|
@ -126,6 +126,8 @@ nsresult IdentityCredentialStorageService::Init() {
|
|||
AssertIsOnMainThread();
|
||||
|
||||
if (AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdown)) {
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
mShuttingDown.Flip();
|
||||
return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче