diff options
author | Grace Kloba <klobag@google.com> | 2010-04-02 16:09:33 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-04-02 16:09:33 -0700 |
commit | b721be96061253a7a8e35313bb5ee794d03d9af8 (patch) | |
tree | f1489587dcf111ba0af3b534bb0d98fcad3df168 /WebCore | |
parent | 726a250195dce8f58044e80342e99ec8c0fa98df (diff) | |
parent | 6e890ae667477f934f978108a1d8d6c2413a6f05 (diff) | |
download | external_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.cpp | 5 |
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(); } |