mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1581084, nsDeviceSensors::IsSensorAllowedByPref should use the principal of the window, not docshell, to check whether to resist fingerprinting, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50525 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
5ea71911af
commit
c1bb23c9ad
@ -572,5 +572,7 @@ bool nsDeviceSensors::IsSensorAllowedByPref(uint32_t aType,
|
||||
return true;
|
||||
}
|
||||
|
||||
return !nsContentUtils::ShouldResistFingerprinting(window->GetDocShell());
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> soPrincipal = do_QueryInterface(window);
|
||||
return !nsContentUtils::ShouldResistFingerprinting(
|
||||
soPrincipal->GetPrincipal());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user