mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 1372069 - Part 1: Disable Geolocation when 'privacy.resistFingerprinting' is true. r=arthuredelstein,smaug
This patch disables Geolocation API when fingerprinting resistance is enabled. The way we disable it is the same as how we disable this API for non-secure origins that we will reject the request from this API and still keep this API around. MozReview-Commit-ID: 5D7Bf6Rplm8 --HG-- extra : rebase_source : b28f33f70a59dc670089dcbbb82f2720a059c341
This commit is contained in:
parent
c2f2b84cee
commit
1ec953e612
@ -1250,7 +1250,8 @@ Geolocation::GetCurrentPosition(GeoPositionCallback callback,
|
||||
Move(options), static_cast<uint8_t>(mProtocolType),
|
||||
false);
|
||||
|
||||
if (!sGeoEnabled || ShouldBlockInsecureRequests()) {
|
||||
if (!sGeoEnabled || ShouldBlockInsecureRequests() ||
|
||||
nsContentUtils::ResistFingerprinting(aCallerType)) {
|
||||
nsCOMPtr<nsIRunnable> ev = new RequestAllowEvent(false, request);
|
||||
NS_DispatchToMainThread(ev);
|
||||
return NS_OK;
|
||||
@ -1336,7 +1337,8 @@ Geolocation::WatchPosition(GeoPositionCallback aCallback,
|
||||
Move(aOptions),
|
||||
static_cast<uint8_t>(mProtocolType), true, *aRv);
|
||||
|
||||
if (!sGeoEnabled || ShouldBlockInsecureRequests()) {
|
||||
if (!sGeoEnabled || ShouldBlockInsecureRequests() ||
|
||||
nsContentUtils::ResistFingerprinting(aCallerType)) {
|
||||
nsCOMPtr<nsIRunnable> ev = new RequestAllowEvent(false, request);
|
||||
NS_DispatchToMainThread(ev);
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user