Bug 832232 - Protect against missing geolocation services during shutdown. r=dougt
authorJosh Matthews <josh@joshmatthews.net>
Wed, 20 Feb 2013 02:10:47 -0500
changeset 122403 c9840572966bf99aedd7f1cb42d8df6f27be5654
parent 122402 462b9501603dfe30a166ae40eebc070f8e307604
child 122404 9811bb0806fc74d0630d99cb7c11b430fc7a5512
push id24336
push userryanvm@gmail.com
push dateWed, 20 Feb 2013 12:07:46 +0000
treeherdermozilla-central@1bcc3c56b011 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs832232
milestone22.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 832232 - Protect against missing geolocation services during shutdown. r=dougt
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2364,17 +2364,19 @@ ContentParent::RecvRemoveGeolocationList
   return true;
 }
 
 bool
 ContentParent::RecvSetGeolocationHigherAccuracy(const bool& aEnable)
 {
     nsRefPtr<nsGeolocationService> geoSvc =
         nsGeolocationService::GetGeolocationService();
-    geoSvc->SetHigherAccuracy(aEnable);
+    if (geoSvc) {
+        geoSvc->SetHigherAccuracy(aEnable);
+    }
     return true;
 }
 
 NS_IMETHODIMP
 ContentParent::HandleEvent(nsIDOMGeoPosition* postion)
 {
   unused << SendGeolocationUpdate(GeoPosition(postion));
   return NS_OK;