summaryrefslogtreecommitdiffstats
path: root/netwerk/cache2/CacheIndex.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /netwerk/cache2/CacheIndex.cpp
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/cache2/CacheIndex.cpp')
-rw-r--r--netwerk/cache2/CacheIndex.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/netwerk/cache2/CacheIndex.cpp b/netwerk/cache2/CacheIndex.cpp
index c0cb63ef6d..34931087c0 100644
--- a/netwerk/cache2/CacheIndex.cpp
+++ b/netwerk/cache2/CacheIndex.cpp
@@ -2213,16 +2213,10 @@ void CacheIndex::ParseRecords(const StaticMutexAutoLock& aProofOfLock) {
reinterpret_cast<uint32_t*>(moz_xmalloc(sizeof(uint32_t)));
NetworkEndian::writeUint32(isDirty, 1);
- // Mark index dirty. The buffer is freed by CacheFileIOManager when
- // nullptr is passed as the listener and the call doesn't fail
- // synchronously.
- rv = CacheFileIOManager::Write(mIndexHandle, 2 * sizeof(uint32_t),
- reinterpret_cast<char*>(isDirty),
- sizeof(uint32_t), true, false, nullptr);
- if (NS_FAILED(rv)) {
- // This is not fatal, just free the memory
- free(isDirty);
- }
+ // Mark index dirty. The buffer will be freed by CacheFileIOManager.
+ CacheFileIOManager::WriteWithoutCallback(
+ mIndexHandle, 2 * sizeof(uint32_t), reinterpret_cast<char*>(isDirty),
+ sizeof(uint32_t), true, false);
}
pos += sizeof(uint32_t);