зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1452445 - Promote MOZ_LOG calls to NS_WARNING in LookupCacheV4. r=gcp
This should help narrow down which of the code paths is responsible for the intermittent failures we are seeing. MozReview-Commit-ID: JHVZzixpOg6 --HG-- extra : rebase_source : c2eefb0bf0f281adf393d2a531db3e5d3ce023d6
This commit is contained in:
Родитель
d64dccaf76
Коммит
2e902f94dd
|
@ -481,9 +481,9 @@ WriteValue(nsIOutputStream *aOutputStream, const T& aValue)
|
|||
auto valueReadPtr = ValueTraits<T>::ReadPtr(aValue);
|
||||
uint32_t written;
|
||||
nsresult rv = aOutputStream->Write(valueReadPtr, writeLength, &written);
|
||||
if (NS_FAILED(rv) || written != writeLength) {
|
||||
LOG(("Failed to write the value."));
|
||||
return NS_FAILED(rv) ? rv : NS_ERROR_FAILURE;
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_WARN_IF(written != writeLength)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
@ -542,24 +542,15 @@ LookupCacheV4::WriteMetadata(TableUpdateV4* aTableUpdate)
|
|||
nsCOMPtr<nsIOutputStream> outputStream;
|
||||
rv = NS_NewLocalFileOutputStream(getter_AddRefs(outputStream), metaFile,
|
||||
PR_WRONLY | PR_TRUNCATE | PR_CREATE_FILE);
|
||||
if (!NS_SUCCEEDED(rv)) {
|
||||
LOG(("Unable to create file to store metadata."));
|
||||
return rv;
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Write the state.
|
||||
rv = WriteValue(outputStream, aTableUpdate->ClientState());
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(("Failed to write the list state."));
|
||||
return rv;
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Write the checksum.
|
||||
rv = WriteValue(outputStream, aTableUpdate->Checksum());
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(("Failed to write the list checksum."));
|
||||
return rv;
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче