summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Geolocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/page/Geolocation.cpp')
-rw-r--r--WebCore/page/Geolocation.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 89897e1..237ceaf 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -283,9 +283,13 @@ PassRefPtr<Geolocation::GeoNotifier> Geolocation::startRequest(PassRefPtr<Positi
if (haveSuitableCachedPosition(notifier->m_options.get()))
notifier->setUseCachedPosition();
else {
- if (notifier->hasZeroTimeout() || startUpdating(notifier.get()))
- notifier->startTimerIfNeeded();
- else
+ if (notifier->hasZeroTimeout() || startUpdating(notifier.get())) {
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ // Only start timer if we're not waiting for user permission.
+ if (!m_startRequestPermissionNotifier)
+#endif
+ notifier->startTimerIfNeeded();
+ } else
notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, "Failed to start Geolocation service"));
}
}
@@ -407,6 +411,7 @@ void Geolocation::setIsAllowed(bool allowed)
if (m_startRequestPermissionNotifier) {
if (isAllowed()) {
// Permission request was made during the startUpdating process
+ m_startRequestPermissionNotifier->startTimerIfNeeded();
m_startRequestPermissionNotifier = 0;
if (!m_frame)
return;