[tbb-commits] [tor-browser/tor-browser-60.1.0esr-8.0-1] Bug 1483377 - Use static array for FilePreferences whitelist instead of StaticAutoPtr. r=mayhemer, a=RyanVM
gk at torproject.org
gk at torproject.org
Thu Aug 16 09:58:40 UTC 2018
commit bd0c7567cd0135e87908f436d1f394ce8c910fef
Author: Valentin Gosu <valentin.gosu at gmail.com>
Date: Tue Aug 14 21:55:20 2018 +0000
Bug 1483377 - Use static array for FilePreferences whitelist instead of StaticAutoPtr. r=mayhemer, a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D3403
--HG--
extra : amend_source : b1eff8c536bcec5112211007347f558e32164905
---
xpcom/io/FilePreferences.cpp | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/xpcom/io/FilePreferences.cpp b/xpcom/io/FilePreferences.cpp
index 9467c055d9bf..5017757ce0fc 100644
--- a/xpcom/io/FilePreferences.cpp
+++ b/xpcom/io/FilePreferences.cpp
@@ -20,15 +20,11 @@ namespace FilePreferences {
static bool sBlockUNCPaths = false;
typedef nsTArray<nsString> WinPaths;
-static StaticAutoPtr<WinPaths> sWhitelist;
static WinPaths& PathWhitelist()
{
- if (!sWhitelist) {
- sWhitelist = new nsTArray<nsString>();
- ClearOnShutdown(&sWhitelist);
- }
- return *sWhitelist;
+ static WinPaths sPaths;
+ return sPaths;
}
#ifdef XP_WIN
@@ -261,9 +257,6 @@ private:
bool IsBlockedUNCPath(const nsAString& aFilePath)
{
typedef TNormalizer<char16_t> Normalizer;
- if (!sWhitelist) {
- return false;
- }
if (!sBlockUNCPaths) {
return false;
More information about the tbb-commits
mailing list