Bug 1964063 - Try to reset a geolocation override only if it was set before. r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D247601
This commit is contained in:
committed by
aborovova@mozilla.com
parent
c9e995bfa3
commit
e4fed060be
@@ -3254,13 +3254,12 @@ void BrowsingContext::SetGeolocationServiceOverride(
|
||||
mGeolocationServiceOverride->Init();
|
||||
}
|
||||
mGeolocationServiceOverride->Update(aGeolocationOverride.Value());
|
||||
} else {
|
||||
} else if (RefPtr<nsGeolocationService> serviceOverride =
|
||||
mGeolocationServiceOverride.forget()) {
|
||||
// Create an original service and move the locators.
|
||||
RefPtr<nsGeolocationService> service =
|
||||
nsGeolocationService::GetGeolocationService();
|
||||
mGeolocationServiceOverride->MoveLocators(service);
|
||||
|
||||
mGeolocationServiceOverride = nullptr;
|
||||
serviceOverride->MoveLocators(service);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user