Bug 1532402 - Part 4: Pass a docshell pointer to nsContentUtils::ShouldResistFingerprinting() for Navigator.maxTouchPoints; r=baku
☠☠ backed out by b28187cd9146 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 05 Mar 2019 15:53:59 +0000
changeset 520294 135025f2d2c03a2b71b5dcaea31fcda2a1da1358
parent 520293 6df23def6c361ab16c5bffbc59bb666dae5e7490
child 520295 2237ab9382ec01be52172dbd51ca1f2a2e878a78
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1532402
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532402 - Part 4: Pass a docshell pointer to nsContentUtils::ShouldResistFingerprinting() for Navigator.maxTouchPoints; r=baku Depends on D21992 Differential Revision: https://phabricator.services.mozilla.com/D21993
dom/base/Navigator.cpp
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -787,17 +787,17 @@ bool Navigator::Vibrate(const nsTArray<u
 //*****************************************************************************
 //  Pointer Events interface
 //*****************************************************************************
 
 uint32_t Navigator::MaxTouchPoints(CallerType aCallerType) {
   // The maxTouchPoints is going to reveal the detail of users' hardware. So,
   // we will spoof it into 0 if fingerprinting resistance is on.
   if (aCallerType != CallerType::System &&
-      nsContentUtils::ShouldResistFingerprinting()) {
+      nsContentUtils::ShouldResistFingerprinting(GetDocShell())) {
     return 0;
   }
 
   nsCOMPtr<nsIWidget> widget =
       widget::WidgetUtils::DOMWindowToWidget(mWindow->GetOuterWindow());
 
   NS_ENSURE_TRUE(widget, 0);
   return widget->GetMaxTouchPoints();