Bug 590026 - Geolocation requests should disconnect their timer on shutdown. r=dougt a=bsmedberg
authorJosh Matthews <josh@joshmatthews.net>
Mon, 23 Aug 2010 22:09:00 -0400
changeset 58096 5538d32b4faef4b751c7825f1c18582553fb759b
parent 58095 9fb7937e306d2b2c9fb35d96b1d9396acade8dde
child 58098 2801d173e385c0e6010098d5fa952c38af072700
push id17153
push userjmatthews@mozilla.com
push dateTue, 23 Nov 2010 20:49:49 +0000
treeherdermozilla-central@5538d32b4fae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt, bsmedberg
bugs590026
milestone2.0b8pre
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 590026 - Geolocation requests should disconnect their timer on shutdown. r=dougt a=bsmedberg
dom/src/geolocation/nsGeolocation.cpp
--- a/dom/src/geolocation/nsGeolocation.cpp
+++ b/dom/src/geolocation/nsGeolocation.cpp
@@ -450,16 +450,20 @@ nsGeolocationRequest::SendLocation(nsIDO
   stack->Pop(&cx);
 
   SetTimeoutTimer();
 }
 
 void
 nsGeolocationRequest::Shutdown()
 {
+  if (mTimeoutTimer) {
+    mTimeoutTimer->Cancel();
+    mTimeoutTimer = nsnull;
+  }
   mCleared = PR_TRUE;
   mCallback = nsnull;
   mErrorCallback = nsnull;
 }
 
 #ifdef MOZ_IPC
 bool nsGeolocationRequest::Recv__delete__(const bool& allow)
 {