Bug 1359299 - V4 caches in LookupCache need to be copied around in copy constructor. r=hchang

MozReview-Commit-ID: AjzUUmQKiPW
This commit is contained in:
DimiL
2017-06-06 14:16:57 +08:00
parent 72817dee2a
commit 02e313d384
7 changed files with 76 additions and 67 deletions

View File

@@ -330,10 +330,7 @@ LookupCacheV4::ApplyUpdate(TableUpdateV4* aTableUpdate,
nsresult
LookupCacheV4::AddFullHashResponseToCache(const FullHashResponseMap& aResponseMap)
{
for (auto iter = aResponseMap.ConstIter(); !iter.Done(); iter.Next()) {
CachedFullHashResponse* response = mCache.LookupOrAdd(iter.Key());
*response = *(iter.Data());
}
CopyClassHashTable<FullHashResponseMap>(aResponseMap, mFullHashCache);
return NS_OK;
}