Bug 1786256 - Let network.cache.shutdown_purge_in_background_task=true ride the trains r=necko-reviewers,kershaw

Differential Revision: https://phabricator.services.mozilla.com/D162190
This commit is contained in:
Valentin Gosu 2022-11-16 12:36:16 +00:00
Родитель 2f2a4cf879
Коммит ef7edc4d4d
2 изменённых файлов: 4 добавлений и 6 удалений

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

@ -11886,7 +11886,7 @@
# delete the cache folder at shutdown in order to avoid shutdown hangs.
- name: network.cache.shutdown_purge_in_background_task
type: RelaxedAtomicBool
#if defined(NIGHTLY_BUILD) && defined(XP_WIN)
#if defined(XP_WIN)
value: true
#else
value: false

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

@ -1382,10 +1382,8 @@ nsresult CacheFileIOManager::OnDelayedStartupFinished() {
return target->Dispatch(
NS_NewRunnableFunction("CacheFileIOManager::OnDelayedStartupFinished",
[ioMan = RefPtr{ioMan}] {
// TODO: Check if there are any old cache dirs.
// Report telemetry.
gInstance->DispatchPurgeTask(""_ns, "0"_ns,
[ioMan = std::move(ioMan)] {
ioMan->DispatchPurgeTask(""_ns, "0"_ns,
kPurgeExtension);
}),
nsIEventTarget::DISPATCH_NORMAL);