bug 1502841 - follow-up to ensure reentering DataStorageSharedThread::Shutdown() doesn't cause problems r=jcj

We shouldn't reenter DataStorageSharedThread::Shutdown(), but it may be
possible. To guard against potentially attempting to shut down the shared thread
more than once, we can check gDataStorageSharedThreadShutDown first.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dana Keeler 2018-11-16 16:14:52 +00:00
Родитель 1313230fb1
Коммит 800094cafe
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -110,7 +110,7 @@ DataStorageSharedThread::Shutdown()
MOZ_ASSERT(XRE_IsParentProcess());
StaticMutexAutoLock lock(sDataStorageSharedThreadMutex);
if (!gDataStorageSharedThread) {
if (!gDataStorageSharedThread || gDataStorageSharedThreadShutDown) {
return NS_OK;
}