Bug 1105556 - We won't have a channelLoadingPrincipal for top level loads, so nsChannelClassifier::SameLoadingURI will return false. Adding a comment to indicate that the behavior is fine since Tracking Protection doesn't apply to top level loads. r=fmarier

This commit is contained in:
Tanvi Vyas 2016-04-13 16:30:25 -07:00
Родитель c73e96a53d
Коммит ae5dad1d9c
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -499,8 +499,12 @@ nsChannelClassifier::SameLoadingURI(nsIDocument *aDoc, nsIChannel *aChannel)
if (!channelLoadInfo || !docURI) {
return false;
}
nsCOMPtr<nsIPrincipal> channelLoadingPrincipal = channelLoadInfo->LoadingPrincipal();
if (!channelLoadingPrincipal) {
// TYPE_DOCUMENT loads will not have a channelLoadingPrincipal. But top level
// loads should not be blocked by Tracking Protection, so we will return
// false
return false;
}
nsCOMPtr<nsIURI> channelLoadingURI;