mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +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() {
|
void ScreenOrientation::MaybeChanged() {
|
||||||
if (ShouldResistFingerprinting()) {
|
Document* doc = GetResponsibleDocument();
|
||||||
|
if (!doc || doc->ShouldResistFingerprinting()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Document* doc = GetResponsibleDocument();
|
BrowsingContext* bc = doc->GetBrowsingContext();
|
||||||
BrowsingContext* bc = doc ? doc->GetBrowsingContext() : nullptr;
|
|
||||||
if (!bc) {
|
if (!bc) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -805,19 +805,6 @@ JSObject* ScreenOrientation::WrapObject(JSContext* aCx,
|
|||||||
return ScreenOrientation_Binding::Wrap(aCx, this, aGivenProto);
|
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_IMPL_ISUPPORTS(ScreenOrientation::VisibleEventListener, nsIDOMEventListener)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -90,8 +90,6 @@ class ScreenOrientation final : public DOMEventTargetHelper {
|
|||||||
|
|
||||||
nsCOMPtr<nsIRunnable> DispatchChangeEventAndResolvePromise();
|
nsCOMPtr<nsIRunnable> DispatchChangeEventAndResolvePromise();
|
||||||
|
|
||||||
bool ShouldResistFingerprinting() const;
|
|
||||||
|
|
||||||
LockPermission GetLockOrientationPermission(bool aCheckSandbox) const;
|
LockPermission GetLockOrientationPermission(bool aCheckSandbox) const;
|
||||||
|
|
||||||
// Gets the responsible document as defined in the spec.
|
// Gets the responsible document as defined in the spec.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user