mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1813081 - Remove ScreenOrientation::ShouldResistFingerprinting. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D168117
This commit is contained in:
parent
90cf68390d
commit
8e5521d76b
@ -716,12 +716,12 @@ Document* ScreenOrientation::GetResponsibleDocument() const {
|
||||
}
|
||||
|
||||
void ScreenOrientation::MaybeChanged() {
|
||||
if (ShouldResistFingerprinting()) {
|
||||
Document* doc = GetResponsibleDocument();
|
||||
if (!doc || doc->ShouldResistFingerprinting()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Document* doc = GetResponsibleDocument();
|
||||
BrowsingContext* bc = doc ? doc->GetBrowsingContext() : nullptr;
|
||||
BrowsingContext* bc = doc->GetBrowsingContext();
|
||||
if (!bc) {
|
||||
return;
|
||||
}
|
||||
@ -805,19 +805,6 @@ JSObject* ScreenOrientation::WrapObject(JSContext* aCx,
|
||||
return ScreenOrientation_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
bool ScreenOrientation::ShouldResistFingerprinting() const {
|
||||
if (nsContentUtils::ShouldResistFingerprinting(
|
||||
"Legacy RFP function called to avoid observed hangs in the code "
|
||||
"below if we can avoid it.")) {
|
||||
bool resist = false;
|
||||
if (nsCOMPtr<nsPIDOMWindowInner> owner = GetOwner()) {
|
||||
resist = nsContentUtils::ShouldResistFingerprinting(owner->GetDocShell());
|
||||
}
|
||||
return resist;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(ScreenOrientation::VisibleEventListener, nsIDOMEventListener)
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -90,8 +90,6 @@ class ScreenOrientation final : public DOMEventTargetHelper {
|
||||
|
||||
nsCOMPtr<nsIRunnable> DispatchChangeEventAndResolvePromise();
|
||||
|
||||
bool ShouldResistFingerprinting() const;
|
||||
|
||||
LockPermission GetLockOrientationPermission(bool aCheckSandbox) const;
|
||||
|
||||
// Gets the responsible document as defined in the spec.
|
||||
|
Loading…
Reference in New Issue
Block a user