Bug 1311933 - P1. Use integer as the key of safebrowsing cache. r=francois
In Bug 1323953, we always send 4-bytes prefix for completion and the prefix is also used as the key to store cache result from gethash request. Since it is always 4-bytes, we could convert it to integer for simplicity. MozReview-Commit-ID: Lkvrg0wvX5Z
This commit is contained in:
@@ -194,11 +194,11 @@ TableUpdateV4::NewChecksum(const std::string& aChecksum)
|
||||
}
|
||||
|
||||
nsresult
|
||||
TableUpdateV4::NewFullHashResponse(const nsACString& aPrefix,
|
||||
TableUpdateV4::NewFullHashResponse(const Prefix& aPrefix,
|
||||
CachedFullHashResponse& aResponse)
|
||||
{
|
||||
CachedFullHashResponse* response =
|
||||
mFullHashResponseMap.LookupOrAdd(aPrefix);
|
||||
mFullHashResponseMap.LookupOrAdd(aPrefix.ToUint32());
|
||||
if (!response) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user