Bug 1710646 - LSNG: UpdateUsageFile should flush the stream before closing it; r=dom-storage-reviewers,asuth

Differential Revision: https://phabricator.services.mozilla.com/D114858
This commit is contained in:
Jan Varga 2021-05-12 03:02:23 +00:00
Родитель 4a1575f61a
Коммит cd7cdb6548
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -1006,6 +1006,10 @@ nsresult UpdateUsageFile(nsIFile* aUsageFile, nsIFile* aUsageJournalFile,
QM_TRY(binaryStream->Write64(aUsage));
#if defined(EARLY_BETA_OR_EARLIER) || defined(DEBUG)
QM_TRY(stream->Flush());
#endif
QM_TRY(stream->Close());
return NS_OK;