Bug 1903559 - Fix the isPBM check in nsContentUtils::ShouldResistFingerprinting_dangerous(). a=dmeehan

Original Revision: https://phabricator.services.mozilla.com/D214356

Differential Revision: https://phabricator.services.mozilla.com/D215022
This commit is contained in:
Tim Huang 2024-06-26 22:31:35 +00:00
parent ec61dcbb6c
commit 11228bb995

View file

@ -2626,7 +2626,7 @@ bool nsContentUtils::ShouldResistFingerprinting_dangerous(
BasePrincipal::Cast(aPrincipal)->OriginAttributesRef();
// With this check, we can ensure that the prefs and target say yes, so only
// an exemption would cause us to return false.
bool isPBM = originAttributes.mPrivateBrowsingId ==
bool isPBM = originAttributes.mPrivateBrowsingId !=
nsIScriptSecurityManager::DEFAULT_PRIVATE_BROWSING_ID;
if (!ShouldResistFingerprinting_("Positive return check", isPBM, aTarget)) {
MOZ_LOG(nsContentUtils::ResistFingerprintingLog(), LogLevel::Debug,