mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1030135: CLOSED TREE Promote pin for services.mozilla.com to production mode (r=keeler)
This commit is contained in:
parent
d3f34ea2cf
commit
22f46bcd74
@ -370,8 +370,6 @@ nsUrlClassifierStreamUpdater::UpdateSuccess(uint32_t requestedTimeout)
|
||||
nsAutoCString strTimeout;
|
||||
strTimeout.AppendInt(requestedTimeout);
|
||||
if (successCallback) {
|
||||
LOG(("nsUrlClassifierStreamUpdater::UpdateSuccess callback [this=%p]",
|
||||
this));
|
||||
successCallback->HandleEvent(strTimeout);
|
||||
}
|
||||
// Now fetch the next request
|
||||
@ -441,25 +439,24 @@ nsUrlClassifierStreamUpdater::OnStartRequest(nsIRequest *request,
|
||||
bool downloadError = false;
|
||||
nsAutoCString strStatus;
|
||||
nsresult status = NS_OK;
|
||||
LOG(("nsUrlClassifierStreamUpdater::OnStartRequest"));
|
||||
|
||||
// Only update if we got http success header
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(request);
|
||||
if (httpChannel) {
|
||||
rv = httpChannel->GetStatus(&status);
|
||||
LOG(("nsUrlClassifierStreamUpdater::OnStartRequest (status=%x)", status));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (NS_FAILED(status)) {
|
||||
if (NS_ERROR_CONNECTION_REFUSED == status ||
|
||||
NS_ERROR_NET_TIMEOUT == status) {
|
||||
// Assume we're overloading the server and trigger backoff.
|
||||
downloadError = true;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(status)) {
|
||||
bool succeeded = false;
|
||||
rv = httpChannel->GetRequestSucceeded(&succeeded);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
LOG(("nsUrlClassifierStreamUpdater::OnStartRequest (%s)", succeeded ?
|
||||
"succeeded" : "failed"));
|
||||
if (!succeeded) {
|
||||
// 404 or other error, pass error status back
|
||||
LOG(("HTTP request returned failure code."));
|
||||
@ -476,7 +473,6 @@ nsUrlClassifierStreamUpdater::OnStartRequest(nsIRequest *request,
|
||||
}
|
||||
|
||||
if (downloadError) {
|
||||
LOG(("nsUrlClassifierStreamUpdater::Download error"));
|
||||
mDownloadErrorCallback->HandleEvent(strStatus);
|
||||
mDownloadError = true;
|
||||
status = NS_ERROR_ABORT;
|
||||
@ -544,12 +540,7 @@ nsUrlClassifierStreamUpdater::OnStopRequest(nsIRequest *request, nsISupports* co
|
||||
|
||||
mChannel = nullptr;
|
||||
|
||||
// If the fetch failed, return the network status rather than NS_OK, the
|
||||
// result of finishing a possibly-empty update
|
||||
if (NS_SUCCEEDED(aStatus)) {
|
||||
return rv;
|
||||
}
|
||||
return aStatus;
|
||||
return rv;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user