Bug 1778510: Require subclasses of nsIGlobalObject implement ShouldRFP r=asuth

For the less common subclasses we will hardcode a choice to always obey
RFP if the pref is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D157562
This commit is contained in:
Tom Ritter
2022-11-28 18:04:04 +00:00
parent 79bbab3382
commit 9b61ead1b5
7 changed files with 35 additions and 3 deletions

View File

@@ -1629,7 +1629,9 @@ bool nsGlobalWindowInner::ShouldResistFingerprinting() const {
if (mDoc) {
return mDoc->ShouldResistFingerprinting();
}
return nsIScriptGlobalObject::ShouldResistFingerprinting();
return nsContentUtils::ShouldResistFingerprinting(
"If we do not have a document then we do not have any context"
"to make an informed RFP choice, so we fall back to the global pref");
}
OriginTrials nsGlobalWindowInner::Trials() const {