Bug 1121497 - Need to stop location manager before start, r=dougt
☠☠ backed out by 80b882dbd0cc ☠ ☠
authorGarvan Keeley <gkeeley@mozilla.com>
Wed, 14 Jan 2015 20:02:00 +0100
changeset 225939 cc42921d3f3603b6983a6edd008296c8fbe8b1bd
parent 225938 6f507c077b24c45a283c500aea3b355c32d56e75
child 225940 32fe616d49503106a386d172ca2367453c2de77b
push id54707
push usercbook@mozilla.com
push dateTue, 27 Jan 2015 07:45:11 +0000
treeherdermozilla-inbound@32fe616d4950 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs1121497
milestone38.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 1121497 - Need to stop location manager before start, r=dougt
dom/system/mac/CoreLocationLocationProvider.mm
--- a/dom/system/mac/CoreLocationLocationProvider.mm
+++ b/dom/system/mac/CoreLocationLocationProvider.mm
@@ -206,16 +206,18 @@ CoreLocationLocationProvider::Startup()
     nsAutoPtr<CoreLocationObjects> clObjs(new CoreLocationObjects());
 
     nsresult rv = clObjs->Init(this);
     NS_ENSURE_SUCCESS(rv, rv);
 
     mCLObjects = clObjs.forget();
   }
 
+  // Must be stopped before starting or response (success or failure) is not guaranteed
+  [mCLObjects->mLocationManager stopUpdatingLocation];
   [mCLObjects->mLocationManager startUpdatingLocation];
   return NS_OK;
 }
 
 NS_IMETHODIMP
 CoreLocationLocationProvider::Watch(nsIGeolocationUpdate* aCallback)
 {
   if (mCallback) {