зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1794766 - Use CancelWithReason in imgRequest and nsLoadGroup, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D159148
This commit is contained in:
Родитель
3127a3d3f3
Коммит
278e75d974
|
@ -350,7 +350,7 @@ void imgRequest::ContinueCancel(nsresult aStatus) {
|
|||
RemoveFromCache();
|
||||
|
||||
if (mRequest && !(progressTracker->GetProgress() & FLAG_LAST_PART_COMPLETE)) {
|
||||
mRequest->Cancel(aStatus);
|
||||
mRequest->CancelWithReason(aStatus, "imgRequest::ContinueCancel"_ns);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ nsLoadGroup::Cancel(nsresult status) {
|
|||
}
|
||||
|
||||
// Cancel the request...
|
||||
rv = request->Cancel(status);
|
||||
rv = request->CancelWithReason(status, mCanceledReason);
|
||||
|
||||
// Remember the first failure and return it...
|
||||
if (NS_FAILED(rv) && NS_SUCCEEDED(firstError)) firstError = rv;
|
||||
|
|
|
@ -425,16 +425,16 @@ NullHttpChannel::GetStatus(nsresult* aStatus) {
|
|||
}
|
||||
|
||||
NS_IMETHODIMP NullHttpChannel::SetCanceledReason(const nsACString& aReason) {
|
||||
return SetCanceledReasonImpl(aReason);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP NullHttpChannel::GetCanceledReason(nsACString& aReason) {
|
||||
return GetCanceledReasonImpl(aReason);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP NullHttpChannel::CancelWithReason(nsresult aStatus,
|
||||
const nsACString& aReason) {
|
||||
return CancelWithReasonImpl(aStatus, aReason);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
Загрузка…
Ссылка в новой задаче