From 0681b3ac9a6ab4879ca2fbfcf8aa9d00a67b8365 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 17 Jun 2024 11:03:13 +0200 Subject: Merging upstream version 115.12.0esr. Signed-off-by: Daniel Baumann --- netwerk/cache2/CacheIndex.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'netwerk/cache2/CacheIndex.cpp') 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(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(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(isDirty), + sizeof(uint32_t), true, false); } pos += sizeof(uint32_t); -- cgit v1.2.3