summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/android
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-04-02 15:26:11 -0700
committerGrace Kloba <klobag@google.com>2010-04-02 15:26:11 -0700
commit6e890ae667477f934f978108a1d8d6c2413a6f05 (patch)
tree2fa1b1c02ee3825d6e6b0e0f618d28f46c435a38 /WebCore/platform/android
parent9dbbb4da177ba7592aaf8d18fbd85a9525bbb5f7 (diff)
downloadexternal_webkit-6e890ae667477f934f978108a1d8d6c2413a6f05.zip
external_webkit-6e890ae667477f934f978108a1d8d6c2413a6f05.tar.gz
external_webkit-6e890ae667477f934f978108a1d8d6c2413a6f05.tar.bz2
When we stopUpdating(), we should cancel the outstanding
timer. When timer fired, we should check m_lastError before calling errorOccurred(). Fix http://b/issue?id=2560897
Diffstat (limited to 'WebCore/platform/android')
-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();
}