summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-04-02 16:09:33 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-04-02 16:09:33 -0700
commitb721be96061253a7a8e35313bb5ee794d03d9af8 (patch)
treef1489587dcf111ba0af3b534bb0d98fcad3df168 /WebCore
parent726a250195dce8f58044e80342e99ec8c0fa98df (diff)
parent6e890ae667477f934f978108a1d8d6c2413a6f05 (diff)
downloadexternal_webkit-b721be96061253a7a8e35313bb5ee794d03d9af8.zip
external_webkit-b721be96061253a7a8e35313bb5ee794d03d9af8.tar.gz
external_webkit-b721be96061253a7a8e35313bb5ee794d03d9af8.tar.bz2
Merge "When we stopUpdating(), we should cancel the outstanding timer." into froyo
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/android/GeolocationServiceAndroid.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp
index 61043fb..7f7d58e 100644
--- a/WebCore/platform/android/GeolocationServiceAndroid.cpp
+++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp
@@ -111,6 +111,9 @@ void GeolocationServiceAndroid::stopUpdating()
// new position from the system service when a request is first made.
m_lastPosition = 0;
m_lastError = 0;
+ // remove the pending timer
+ if (m_timer.isActive())
+ m_timer.stop();
}
void GeolocationServiceAndroid::suspend()
@@ -155,7 +158,7 @@ void GeolocationServiceAndroid::timerFired(Timer<GeolocationServiceAndroid>* tim
ASSERT(m_lastPosition || m_lastError);
if (m_lastPosition)
positionChanged();
- else
+ else if (m_lastError)
errorOccurred();
}