зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1363882 - Remove casting address of inactive member union result.hash r=francois
MozReview-Commit-ID: 3pVaVJ1EJZu --HG-- extra : rebase_source : 6549a5f1d303363cfb472753c3fe256c3d1dd740
This commit is contained in:
Родитель
62625fef28
Коммит
4909ab1a70
|
@ -44,7 +44,13 @@ public:
|
|||
|
||||
nsCString PartialHash() {
|
||||
MOZ_ASSERT(mPartialHashLength <= COMPLETE_SIZE);
|
||||
return nsCString(reinterpret_cast<char*>(hash.complete.buf), mPartialHashLength);
|
||||
if (mNoise) {
|
||||
return nsCString(reinterpret_cast<char*>(hash.fixedLengthPrefix.buf),
|
||||
PREFIX_SIZE);
|
||||
} else {
|
||||
return nsCString(reinterpret_cast<char*>(hash.complete.buf),
|
||||
mPartialHashLength);
|
||||
}
|
||||
}
|
||||
|
||||
nsCString PartialHashHex() {
|
||||
|
|
|
@ -1097,10 +1097,7 @@ nsUrlClassifierLookupCallback::LookupComplete(nsTArray<LookupResult>* results)
|
|||
|
||||
// Bug 1323953 - Send the first 4 bytes for completion no matter how
|
||||
// long we matched the prefix.
|
||||
nsAutoCString partialHash;
|
||||
partialHash.Assign(reinterpret_cast<char*>(&result.hash.fixedLengthPrefix),
|
||||
PREFIX_SIZE);
|
||||
nsresult rv = completer->Complete(partialHash,
|
||||
nsresult rv = completer->Complete(result.PartialHash(),
|
||||
gethashUrl,
|
||||
result.mTableName,
|
||||
this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче