diff --git a/dom/security/ReferrerInfo.cpp b/dom/security/ReferrerInfo.cpp index a79f1bc36d1e..050cb916f2e3 100644 --- a/dom/security/ReferrerInfo.cpp +++ b/dom/security/ReferrerInfo.cpp @@ -198,7 +198,13 @@ ReferrerPolicy ReferrerInfo::GetDefaultReferrerPolicy(nsIHttpChannel* aChannel, if (!cjs) { cjs = net::CookieJarSettings::Create(); } - if (cjs->GetRejectThirdPartyContexts()) { + + // We only check if the channel is isolated if it's in the parent process + // with the rejection of third party contexts is enabled. We don't need to + // check this in content processes since the tracking state of the channel + // is unknown here and the referrer policy would be updated when the channel + // starts connecting in the parent process. + if (XRE_IsParentProcess() && cjs->GetRejectThirdPartyContexts()) { uint32_t rejectedReason = 0; thirdPartyTrackerIsolated = !ContentBlocking::ShouldAllowAccessFor( aChannel, aURI, &rejectedReason);