Bug 1668437 - Check return code of NS_NewChannel in SetupIPCheckChannel r=necko-reviewers,dragana

Differential Revision: https://phabricator.services.mozilla.com/D92026
This commit is contained in:
Valentin Gosu 2020-10-01 10:06:32 +00:00
Родитель 219717c7ce
Коммит 94902b6253
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -335,8 +335,10 @@ static inline already_AddRefed<nsIChannel> SetupIPCheckChannel(bool ipv4) {
nsIRequest::LOAD_BYPASS_CACHE | // don't read from the cache
nsIRequest::INHIBIT_CACHING | // don't write the response to cache
nsIRequest::LOAD_ANONYMOUS); // prevent privacy leaks
NS_ENSURE_SUCCESS(rv, nullptr);
channel->SetTRRMode(nsIRequest::TRR_DISABLED_MODE);
rv = channel->SetTRRMode(nsIRequest::TRR_DISABLED_MODE);
NS_ENSURE_SUCCESS(rv, nullptr);
{
// Prevent HTTPS-Only Mode from upgrading the OCSP request.
@ -349,8 +351,6 @@ static inline already_AddRefed<nsIChannel> SetupIPCheckChannel(bool ipv4) {
loadInfo->SetAllowDeprecatedSystemRequests(true);
}
NS_ENSURE_SUCCESS(rv, nullptr);
nsCOMPtr<nsIHttpChannelInternal> internalChan = do_QueryInterface(channel);
NS_ENSURE_TRUE(internalChan, nullptr);