Bug 1434206 - Make TableUpdate objects const as much as possible. r=gcp

I tried to make TableUpdateArray point to const TableUpdate objects
everywhere but there were two problems:

- HashStore::ApplyUpdate() triggers a few Merge() calls which include
  sorting the underlying TableUpdate object first.

- LookupCacheV4::ApplyUpdate() calls TableUpdateV4::NewChecksum() when the
  checksum is missing and that sets mChecksum.

MozReview-Commit-ID: LIhJcoxo7e7
This commit is contained in:
Francois Marier
2018-05-11 16:02:37 -07:00
parent ef8ea55aca
commit b910cbbb34
10 changed files with 33 additions and 27 deletions

View File

@@ -571,7 +571,7 @@ template<class T>
static nsresult
Merge(ChunkSet* aStoreChunks,
FallibleTArray<T>* aStorePrefixes,
ChunkSet& aUpdateChunks,
const ChunkSet& aUpdateChunks,
FallibleTArray<T>& aUpdatePrefixes,
bool aAllowMerging = false)
{