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 id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersdougt, bsmedberg
bugs590026
milestone2.0b8pre
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)
 {