Bug 1402363: Explicitly cancel channel after mixed content redirect. r=honza,kate

This commit is contained in:
Christoph Kerschbaumer 2017-10-02 09:11:57 +02:00
Родитель 481bdfb4f4
Коммит 8944f6c302
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -394,7 +394,11 @@ nsMixedContentBlocker::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
nullptr, // aExtra
requestingPrincipal,
&decision);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv)) {
autoCallback.DontCallback();
aOldChannel->Cancel(NS_ERROR_DOM_BAD_URI);
return NS_BINDING_FAILED;
}
if (nsMixedContentBlocker::sSendHSTSPriming) {
// The LoadInfo passed in is for the original channel, HSTS priming needs to
@ -419,6 +423,7 @@ nsMixedContentBlocker::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
// If the channel is about to load mixed content, abort the channel
if (!NS_CP_ACCEPTED(decision)) {
autoCallback.DontCallback();
aOldChannel->Cancel(NS_ERROR_DOM_BAD_URI);
return NS_BINDING_FAILED;
}