Bug 836994: Check the right array when using using WatchPosition. r=jdm
authorGlenna Buford <glennaL.buford@gmail.com>
Sun, 03 Feb 2013 13:39:00 +0000
changeset 120758 3971bce2c85bd6ae3845cfd941de4550ab0c9010
parent 120757 9a0eecc327b655e912765ff8ed5ef3b0939a273e
child 120759 3a4c239b51971fc3fd1dda362e7718f62d1d4adb
push id22398
push userjosh@joshmatthews.net
push dateMon, 04 Feb 2013 15:40:54 +0000
treeherdermozilla-inbound@3971bce2c85b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs836994
milestone21.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 836994: Check the right array when using using WatchPosition. r=jdm
dom/src/geolocation/nsGeolocation.cpp
--- a/dom/src/geolocation/nsGeolocation.cpp
+++ b/dom/src/geolocation/nsGeolocation.cpp
@@ -1332,17 +1332,17 @@ nsGeolocation::WatchPosition(nsIDOMGeoPo
 nsresult
 nsGeolocation::WatchPosition(nsIDOMGeoPositionCallback *callback,
                              nsIDOMGeoPositionErrorCallback *errorCallback,
                              mozilla::dom::GeoPositionOptions *options,
                              int32_t *_retval)
 {
   NS_ENSURE_ARG_POINTER(callback);
 
-  if (mPendingCallbacks.Length() > MAX_GEO_REQUESTS_PER_WINDOW) {
+  if (mWatchingCallbacks.Length() > MAX_GEO_REQUESTS_PER_WINDOW) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   // The watch ID:
   *_retval = mLastWatchId++;
 
   nsRefPtr<nsGeolocationRequest> request = new nsGeolocationRequest(this,
                                                                     callback,