tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 90d6a6333a62ea7f8d86037bb4d9a8a6ba7c6bbf
parent 87c044b95f419b4d461eac12af9372e0df389307
Author: Randell Jesup <rjesup@mozilla.com>
Date:   Mon, 20 Oct 2025 12:11:16 +0000

Bug 1995137: Tell CacheEntry that metadata has all been written after changing it for Dictionaries r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D269176

Diffstat:
Mnetwerk/cache2/Dictionary.cpp | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/netwerk/cache2/Dictionary.cpp b/netwerk/cache2/Dictionary.cpp @@ -409,12 +409,20 @@ nsresult DictionaryCacheEntry::Write(nsICacheEntry* aCacheEntry) { MakeMetadataEntry(metadata); DICTIONARY_LOG( ("DictionaryCacheEntry::Write %s %s", mURI.get(), metadata.get())); - return aCacheEntry->SetMetaDataElement(mURI.get(), metadata.get()); + nsresult rv = aCacheEntry->SetMetaDataElement(mURI.get(), metadata.get()); + if (NS_FAILED(rv)) { + return rv; + } + return aCacheEntry->MetaDataReady(); } nsresult DictionaryCacheEntry::RemoveEntry(nsICacheEntry* aCacheEntry) { DICTIONARY_LOG(("RemoveEntry from metadata for %s", mURI.get())); - return aCacheEntry->SetMetaDataElement(mURI.BeginReading(), nullptr); + nsresult rv = aCacheEntry->SetMetaDataElement(mURI.BeginReading(), nullptr); + if (NS_FAILED(rv)) { + return rv; + } + return aCacheEntry->MetaDataReady(); } // Parse - | for field seperator; \ for escape of | or \ .