зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1323953 - Send 4-byte prefix for both v2/v4 tables. r=francois
MozReview-Commit-ID: 1jlBdSQARNg --HG-- extra : rebase_source : 94ca2da38a7aeae061a37cb9013b45dfefbcc843
This commit is contained in:
Родитель
c49c5962c5
Коммит
a835d0face
|
@ -996,20 +996,11 @@ nsUrlClassifierLookupCallback::LookupComplete(nsTArray<LookupResult>* results)
|
|||
mDBService->GetCompleter(result.mTableName,
|
||||
getter_AddRefs(completer))) {
|
||||
|
||||
// TODO: Figure out how long the partial hash should be sent
|
||||
// for completion. See Bug 1323953.
|
||||
// Bug 1323953 - Send the first 4 bytes for completion no matter how
|
||||
// long we matched the prefix.
|
||||
nsAutoCString partialHash;
|
||||
if (StringEndsWith(result.mTableName, NS_LITERAL_CSTRING("-proto"))) {
|
||||
// We send the complete partial hash for v4 at the moment.
|
||||
partialHash = result.PartialHash();
|
||||
} else {
|
||||
// We always send the first 4 bytes of the partial hash for
|
||||
// non-v4 tables. This matters when we have 32-byte prefix
|
||||
// in "test-xxx-simple" test data.
|
||||
partialHash.Assign(reinterpret_cast<char*>(&result.hash.fixedLengthPrefix),
|
||||
PREFIX_SIZE);
|
||||
}
|
||||
|
||||
partialHash.Assign(reinterpret_cast<char*>(&result.hash.fixedLengthPrefix),
|
||||
PREFIX_SIZE);
|
||||
nsresult rv = completer->Complete(partialHash,
|
||||
gethashUrl,
|
||||
result.mTableName,
|
||||
|
|
Загрузка…
Ссылка в новой задаче