summaryrefslogtreecommitdiffstats
path: root/dom/quota
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:22:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:22:11 +0000
commit724b36b7051c0d9190cbd8854ba5919904967c11 (patch)
tree8996ac57bf70972bf524e865e0845cd54aab6f6b /dom/quota
parentReleasing progress-linux version 115.10.0esr-1~deb12u1progress7u1. (diff)
downloadfirefox-esr-724b36b7051c0d9190cbd8854ba5919904967c11.tar.xz
firefox-esr-724b36b7051c0d9190cbd8854ba5919904967c11.zip
Merging upstream version 115.11.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/quota')
-rw-r--r--dom/quota/ActorsParent.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/dom/quota/ActorsParent.cpp b/dom/quota/ActorsParent.cpp
index eb0f8706fd..0d903b490e 100644
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -3541,13 +3541,25 @@ void QuotaManager::Shutdown() {
ScopedLogExtraInfo scope{ScopedLogExtraInfo::kTagContext,
"dom::quota::QuotaManager::Shutdown"_ns};
+ // We always need to ensure that firefox does not shutdown with a private
+ // repository still on disk. They are ideally cleaned up on PBM session end
+ // but, in some cases like PBM autostart (i.e.
+ // browser.privatebrowsing.autostart), private repository could only be
+ // cleaned up on shutdown. ClearPrivateRepository below runs a async op and is
+ // better to do it before we run the ShutdownStorageOp since it expects all
+ // cleanup operations to be done by that point. We don't need to use the
+ // returned promise here because `ClearPrivateRepository` registers the
+ // underlying `ClearPrivateRepositoryOp` in `gNormalOriginOps`.
+ ClearPrivateRepository();
+
// This must be called before `flagShutdownStarted`, it would fail otherwise.
// `ShutdownStorageOp` needs to acquire an exclusive directory lock over
// entire <profile>/storage which will abort any existing operations and wait
// for all existing directory locks to be released. So the shutdown operation
// will effectively run after all existing operations.
- // We don't need to use the returned promise here because `ShutdownStorage`
- // registers `ShudownStorageOp` in `gNormalOriginOps`.
+ // Similar, to ClearPrivateRepository operation above, ShutdownStorageOp also
+ // registers it's operation in `gNormalOriginOps` so we don't need to assign
+ // returned promise.
ShutdownStorage();
flagShutdownStarted();