From 800094cafeac354b5f4bb76ea7a74986e73ee4ce Mon Sep 17 00:00:00 2001 From: Dana Keeler Date: Fri, 16 Nov 2018 16:14:52 +0000 Subject: [PATCH] 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 --- security/manager/ssl/DataStorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/manager/ssl/DataStorage.cpp b/security/manager/ssl/DataStorage.cpp index 047da4365743..fcaefeb7dc10 100644 --- a/security/manager/ssl/DataStorage.cpp +++ b/security/manager/ssl/DataStorage.cpp @@ -110,7 +110,7 @@ DataStorageSharedThread::Shutdown() MOZ_ASSERT(XRE_IsParentProcess()); StaticMutexAutoLock lock(sDataStorageSharedThreadMutex); - if (!gDataStorageSharedThread) { + if (!gDataStorageSharedThread || gDataStorageSharedThreadShutDown) { return NS_OK; }