author | Honza Bambas <honzab.moz@firemni.cz> |
Wed, 18 May 2016 06:39:00 +0200 | |
changeset 298971 | 61d37541894f9d87674a6ba790498db0b9278e38 |
parent 298970 | 27e93cb03221d985ee2c389d27be4fa6a5d2307f |
child 298972 | 10a3bd5421b1d223a2e3110396d0ff986197be86 |
push id | 30286 |
push user | kwierso@gmail.com |
push date | Wed, 25 May 2016 22:33:39 +0000 |
treeherder | mozilla-central@1012461fa7bb [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | michal |
bugs | 1273875 |
milestone | 49.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/netwerk/cache2/CacheStorageService.cpp +++ b/netwerk/cache2/CacheStorageService.cpp @@ -141,37 +141,43 @@ void CacheStorageService::Shutdown() LOG(("CacheStorageService::Shutdown - start")); mShutdown = true; nsCOMPtr<nsIRunnable> event = NewRunnableMethod(this, &CacheStorageService::ShutdownBackground); Dispatch(event); - mozilla::MutexAutoLock lock(mLock); - sGlobalEntryTables->Clear(); - delete sGlobalEntryTables; - sGlobalEntryTables = nullptr; + { + mozilla::MutexAutoLock lock(mLock); +#ifdef NS_FREE_PERMANENT_DATA + sGlobalEntryTables->Clear(); + delete sGlobalEntryTables; +#endif + sGlobalEntryTables = nullptr; + } LOG(("CacheStorageService::Shutdown - done")); } void CacheStorageService::ShutdownBackground() { MOZ_ASSERT(IsOnManagementThread()); // Cancel purge timer to avoid leaking. if (mPurgeTimer) { mPurgeTimer->Cancel(); } +#ifdef NS_FREE_PERMANENT_DATA Pool(false).mFrecencyArray.Clear(); Pool(false).mExpirationArray.Clear(); Pool(true).mFrecencyArray.Clear(); Pool(true).mExpirationArray.Clear(); +#endif } // Internal management methods namespace { // WalkCacheRunnable // Base class for particular storage entries visiting