forked from mirrors/gecko-dev
Backed out 2 changesets (bug 1447935) for perma failures on test_headless.js. CLOSED TREE
Backed out changeset 0332d1b01f63 (bug 1447935) Backed out changeset bcf6ab4e4f50 (bug 1447935)
This commit is contained in:
parent
ab9f3eb05b
commit
cb161b6b55
5 changed files with 75 additions and 70 deletions
|
|
@ -342,16 +342,6 @@ nsresult UrlClassifierCommon::CreatePairwiseEntityListURI(nsIChannel* aChannel,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!topWinURI) {
|
|
||||||
UC_LOG(
|
|
||||||
("CreatePairwiseWhiteListURI: No top-level window associated with "
|
|
||||||
"channel, get URI from loading principal instead"));
|
|
||||||
nsCOMPtr<nsIPrincipal> principal = loadInfo->GetLoadingPrincipal();
|
|
||||||
auto* basePrin = BasePrincipal::Cast(principal);
|
|
||||||
rv = basePrin->GetURI(getter_AddRefs(topWinURI));
|
|
||||||
Unused << NS_WARN_IF(NS_FAILED(rv));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!topWinURI) {
|
if (!topWinURI) {
|
||||||
|
|
@ -364,7 +354,7 @@ nsresult UrlClassifierCommon::CreatePairwiseEntityListURI(nsIChannel* aChannel,
|
||||||
uri->GetAsciiSpec(spec);
|
uri->GetAsciiSpec(spec);
|
||||||
spec.Truncate(
|
spec.Truncate(
|
||||||
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
||||||
UC_LOG(("CreatePairwiseEntityListURI: No top-level URI associated with %s",
|
UC_LOG(("CreatePairwiseEntityListURI: No window URI associated with %s",
|
||||||
spec.get()));
|
spec.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@
|
||||||
|
|
||||||
#include "UrlClassifierFeatureCryptominingProtection.h"
|
#include "UrlClassifierFeatureCryptominingProtection.h"
|
||||||
|
|
||||||
#include "mozilla/AntiTrackingUtils.h"
|
|
||||||
#include "mozilla/net/UrlClassifierCommon.h"
|
#include "mozilla/net/UrlClassifierCommon.h"
|
||||||
#include "ChannelClassifierService.h"
|
#include "ChannelClassifierService.h"
|
||||||
#include "mozilla/StaticPrefs_privacy.h"
|
#include "mozilla/StaticPrefs_privacy.h"
|
||||||
|
#include "nsContentUtils.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
@ -87,23 +87,27 @@ UrlClassifierFeatureCryptominingProtection::MaybeCreate(nsIChannel* aChannel) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isThirdParty = AntiTrackingUtils::IsThirdPartyChannel(aChannel);
|
nsCOMPtr<nsIURI> chanURI;
|
||||||
|
nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isThirdParty =
|
||||||
|
nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, chanURI);
|
||||||
if (!isThirdParty) {
|
if (!isThirdParty) {
|
||||||
if (UC_LOG_ENABLED()) {
|
if (UC_LOG_ENABLED()) {
|
||||||
nsCOMPtr<nsIURI> chanURI;
|
nsCString spec = chanURI->GetSpecOrDefault();
|
||||||
Unused << aChannel->GetURI(getter_AddRefs(chanURI));
|
spec.Truncate(
|
||||||
if (chanURI) {
|
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
||||||
nsCString spec = chanURI->GetSpecOrDefault();
|
UC_LOG(
|
||||||
spec.Truncate(
|
("UrlClassifierFeatureCryptominingProtection: Skipping cryptomining "
|
||||||
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
"checks "
|
||||||
UC_LOG(
|
"for first party or top-level load channel[%p] "
|
||||||
("UrlClassifierFeatureCryptominingProtection: Skipping cryptomining "
|
"with uri %s",
|
||||||
"checks "
|
aChannel, spec.get()));
|
||||||
"for first party or top-level load channel[%p] "
|
|
||||||
"with uri %s",
|
|
||||||
aChannel, spec.get()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@
|
||||||
|
|
||||||
#include "UrlClassifierFeatureFingerprintingProtection.h"
|
#include "UrlClassifierFeatureFingerprintingProtection.h"
|
||||||
|
|
||||||
#include "mozilla/AntiTrackingUtils.h"
|
|
||||||
#include "mozilla/net/UrlClassifierCommon.h"
|
#include "mozilla/net/UrlClassifierCommon.h"
|
||||||
#include "ChannelClassifierService.h"
|
#include "ChannelClassifierService.h"
|
||||||
#include "mozilla/StaticPrefs_privacy.h"
|
#include "mozilla/StaticPrefs_privacy.h"
|
||||||
|
#include "nsContentUtils.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
@ -90,22 +90,25 @@ UrlClassifierFeatureFingerprintingProtection::MaybeCreate(
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isThirdParty = AntiTrackingUtils::IsThirdPartyChannel(aChannel);
|
nsCOMPtr<nsIURI> chanURI;
|
||||||
|
nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isThirdParty =
|
||||||
|
nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, chanURI);
|
||||||
if (!isThirdParty) {
|
if (!isThirdParty) {
|
||||||
if (UC_LOG_ENABLED()) {
|
if (UC_LOG_ENABLED()) {
|
||||||
nsCOMPtr<nsIURI> chanURI;
|
nsCString spec = chanURI->GetSpecOrDefault();
|
||||||
Unused << aChannel->GetURI(getter_AddRefs(chanURI));
|
spec.Truncate(
|
||||||
if (chanURI) {
|
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
||||||
nsCString spec = chanURI->GetSpecOrDefault();
|
UC_LOG(
|
||||||
spec.Truncate(
|
("UrlClassifierFeatureFingerprintingProtection: Skipping "
|
||||||
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
"fingerprinting checks "
|
||||||
UC_LOG(
|
"for first party or top-level load channel[%p] "
|
||||||
("UrlClassifierFeatureFingerprintingProtection: Skipping "
|
"with uri %s",
|
||||||
"fingerprinting checks "
|
aChannel, spec.get()));
|
||||||
"for first party or top-level load channel[%p] "
|
|
||||||
"with uri %s",
|
|
||||||
aChannel, spec.get()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@
|
||||||
|
|
||||||
#include "UrlClassifierFeatureSocialTrackingProtection.h"
|
#include "UrlClassifierFeatureSocialTrackingProtection.h"
|
||||||
|
|
||||||
#include "mozilla/AntiTrackingUtils.h"
|
|
||||||
#include "mozilla/net/UrlClassifierCommon.h"
|
#include "mozilla/net/UrlClassifierCommon.h"
|
||||||
#include "ChannelClassifierService.h"
|
#include "ChannelClassifierService.h"
|
||||||
#include "mozilla/StaticPrefs_privacy.h"
|
#include "mozilla/StaticPrefs_privacy.h"
|
||||||
|
#include "nsContentUtils.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
@ -90,23 +90,27 @@ UrlClassifierFeatureSocialTrackingProtection::MaybeCreate(
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isThirdParty = AntiTrackingUtils::IsThirdPartyChannel(aChannel);
|
nsCOMPtr<nsIURI> chanURI;
|
||||||
|
nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isThirdParty =
|
||||||
|
nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, chanURI);
|
||||||
if (!isThirdParty) {
|
if (!isThirdParty) {
|
||||||
if (UC_LOG_ENABLED()) {
|
if (UC_LOG_ENABLED()) {
|
||||||
nsCOMPtr<nsIURI> chanURI;
|
nsCString spec = chanURI->GetSpecOrDefault();
|
||||||
Unused << aChannel->GetURI(getter_AddRefs(chanURI));
|
spec.Truncate(
|
||||||
if (chanURI) {
|
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
||||||
nsCString spec = chanURI->GetSpecOrDefault();
|
UC_LOG(
|
||||||
spec.Truncate(
|
("UrlClassifierFeatureSocialTrackingProtection: Skipping "
|
||||||
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
"socialtracking checks "
|
||||||
UC_LOG(
|
"for first party or top-level load channel[%p] "
|
||||||
("UrlClassifierFeatureSocialTrackingProtection: Skipping "
|
"with uri %s",
|
||||||
"socialtracking checks "
|
aChannel, spec.get()));
|
||||||
"for first party or top-level load channel[%p] "
|
|
||||||
"with uri %s",
|
|
||||||
aChannel, spec.get()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@
|
||||||
|
|
||||||
#include "UrlClassifierFeatureTrackingProtection.h"
|
#include "UrlClassifierFeatureTrackingProtection.h"
|
||||||
|
|
||||||
#include "mozilla/AntiTrackingUtils.h"
|
|
||||||
#include "mozilla/net/UrlClassifierCommon.h"
|
#include "mozilla/net/UrlClassifierCommon.h"
|
||||||
#include "ChannelClassifierService.h"
|
#include "ChannelClassifierService.h"
|
||||||
|
#include "nsContentUtils.h"
|
||||||
#include "nsIHttpChannelInternal.h"
|
#include "nsIHttpChannelInternal.h"
|
||||||
#include "nsILoadContext.h"
|
#include "nsILoadContext.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
|
|
@ -93,22 +93,26 @@ UrlClassifierFeatureTrackingProtection::MaybeCreate(nsIChannel* aChannel) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isThirdParty = AntiTrackingUtils::IsThirdPartyChannel(aChannel);
|
nsCOMPtr<nsIURI> chanURI;
|
||||||
|
nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isThirdParty =
|
||||||
|
nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, chanURI);
|
||||||
if (!isThirdParty) {
|
if (!isThirdParty) {
|
||||||
if (UC_LOG_ENABLED()) {
|
if (UC_LOG_ENABLED()) {
|
||||||
nsCOMPtr<nsIURI> chanURI;
|
nsCString spec = chanURI->GetSpecOrDefault();
|
||||||
Unused << aChannel->GetURI(getter_AddRefs(chanURI));
|
spec.Truncate(
|
||||||
if (chanURI) {
|
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
||||||
nsCString spec = chanURI->GetSpecOrDefault();
|
UC_LOG(
|
||||||
spec.Truncate(
|
("UrlClassifierFeatureTrackingProtection: Skipping tracking "
|
||||||
std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
|
"protection checks for first party or top-level load channel[%p] "
|
||||||
UC_LOG(
|
"with uri %s",
|
||||||
("UrlClassifierFeatureTrackingProtection: Skipping tracking "
|
aChannel, spec.get()));
|
||||||
"protection checks for first party or top-level load channel[%p] "
|
|
||||||
"with uri %s",
|
|
||||||
aChannel, spec.get()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue