Bug 1145111: ensure the pos. cache isn't reset when nsGeolocationService shuts down provider. r=jdm

After 6 seconds of idle, nsGeolocationService shuts down its provider, and was unintenionally
clearing the position cache.
This commit is contained in:
Garvan Keeley 2015-05-20 12:35:06 -04:00
parent d9303b5b7a
commit 2791393f38

View File

@ -958,7 +958,9 @@ nsGeolocationService::Observe(nsISupports* aSubject,
NS_IMETHODIMP
nsGeolocationService::Update(nsIDOMGeoPosition *aSomewhere)
{
SetCachedPosition(aSomewhere);
if (aSomewhere) {
SetCachedPosition(aSomewhere);
}
for (uint32_t i = 0; i< mGeolocators.Length(); i++) {
mGeolocators[i]->Update(aSomewhere);