Bug 1776451 - prevent crash during account manager shutdown if folder cache isn't initialized. r=aleca
Differential Revision: https://phabricator.services.mozilla.com/D150298 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2e2f69d522
Коммит
d357c99f6a
|
@ -191,10 +191,13 @@ nsresult nsMsgAccountManager::Shutdown() {
|
|||
do_GetService(NS_MSGPURGESERVICE_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && purgeService) purgeService->Shutdown();
|
||||
|
||||
// The DTOR is meant to do the flushing, but observed behaviour is
|
||||
// that it doesn't always get called. So flush explicitly.
|
||||
m_msgFolderCache->Flush();
|
||||
m_msgFolderCache = nullptr;
|
||||
if (m_msgFolderCache) {
|
||||
// The DTOR is meant to do the flushing, but observed behaviour is
|
||||
// that it doesn't always get called. So flush explicitly.
|
||||
m_msgFolderCache->Flush();
|
||||
m_msgFolderCache = nullptr;
|
||||
}
|
||||
|
||||
m_haveShutdown = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче