summaryrefslogtreecommitdiffstats
path: root/dom/cache/Manager.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/cache/Manager.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/cache/Manager.cpp')
-rw-r--r--dom/cache/Manager.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/dom/cache/Manager.cpp b/dom/cache/Manager.cpp
index ef36309e13..68a19e5862 100644
--- a/dom/cache/Manager.cpp
+++ b/dom/cache/Manager.cpp
@@ -651,6 +651,15 @@ class Manager::CacheMatchAction final : public Manager::BaseAction {
/* aCreate */ false)));
}
+ // If we entered shutdown on the main thread while we were doing IO,
+ // bail out now.
+ if (AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownQM)) {
+ if (stream) {
+ stream->Close();
+ }
+ return NS_ERROR_ABORT;
+ }
+
mStreamList->Add(mResponse.mBodyId, std::move(stream));
return NS_OK;
@@ -718,6 +727,15 @@ class Manager::CacheMatchAllAction final : public Manager::BaseAction {
/* aCreate */ false)));
}
+ // If we entered shutdown on the main thread while we were doing IO,
+ // bail out now.
+ if (AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownQM)) {
+ if (stream) {
+ stream->Close();
+ }
+ return NS_ERROR_ABORT;
+ }
+
mStreamList->Add(mSavedResponses[i].mBodyId, std::move(stream));
}
@@ -1264,6 +1282,15 @@ class Manager::CacheKeysAction final : public Manager::BaseAction {
/* aCreate */ false)));
}
+ // If we entered shutdown on the main thread while we were doing IO,
+ // bail out now.
+ if (AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownQM)) {
+ if (stream) {
+ stream->Close();
+ }
+ return NS_ERROR_ABORT;
+ }
+
mStreamList->Add(mSavedRequests[i].mBodyId, std::move(stream));
}
@@ -1334,6 +1361,15 @@ class Manager::StorageMatchAction final : public Manager::BaseAction {
/* aCreate */ false)));
}
+ // If we entered shutdown on the main thread while we were doing IO,
+ // bail out now.
+ if (AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownQM)) {
+ if (stream) {
+ stream->Close();
+ }
+ return NS_ERROR_ABORT;
+ }
+
mStreamList->Add(mSavedResponse.mBodyId, std::move(stream));
return NS_OK;