Bug 1532408 - Pass a docshell pointer to nsContentUtils::ShouldResistFingerprinting() callers in nsGlobalWindowInner.cpp; r=baku

Differential Revision: https://phabricator.services.mozilla.com/D21995

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2019-03-05 12:42:52 +00:00
Родитель 1ca4e927ea
Коммит 15d8f1aa80
1 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -5713,9 +5713,7 @@ void nsGlobalWindowInner::DisableDeviceSensor(uint32_t aType) {
#if defined(MOZ_WIDGET_ANDROID)
void nsGlobalWindowInner::EnableOrientationChangeListener() {
// XXX: mDocShell is never set on the inner window?
nsIDocShell* docShell = nullptr;
if (!nsContentUtils::ShouldResistFingerprinting(docShell) &&
if (!nsContentUtils::ShouldResistFingerprinting(GetDocShell()) &&
!mOrientationChangeObserver) {
mOrientationChangeObserver = MakeUnique<WindowOrientationObserver>(this);
}
@ -5894,7 +5892,7 @@ void nsGlobalWindowInner::GetGamepads(nsTArray<RefPtr<Gamepad>>& aGamepads) {
// navigator.getGamepads() always returns an empty array when
// privacy.resistFingerprinting is true.
if (nsContentUtils::ShouldResistFingerprinting()) {
if (nsContentUtils::ShouldResistFingerprinting(GetDocShell())) {
return;
}