summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Geolocation.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-06-09 11:21:20 +0100
committerSteve Block <steveblock@google.com>2010-06-09 11:30:57 +0100
commit27009bcd4f0d3c6fb5f1324521a353c8fdfd168c (patch)
tree2f0622bcff4d1d45bc17d6ba1040ba1db9b7eae7 /WebCore/page/Geolocation.cpp
parent3f850c8cca17a6dcd601ed73b9b5ac654b0ec482 (diff)
downloadexternal_webkit-27009bcd4f0d3c6fb5f1324521a353c8fdfd168c.zip
external_webkit-27009bcd4f0d3c6fb5f1324521a353c8fdfd168c.tar.gz
external_webkit-27009bcd4f0d3c6fb5f1324521a353c8fdfd168c.tar.bz2
Cherry-pick WebKit change r60069 to fix a leak in Geolocation
This change was made as a fix for Bug https://bugs.webkit.org/show_bug.cgi?id=39288 but was later rolled back in r60441 pending further discussion. We need this fix, so cherry-pick it to Android until https://bugs.webkit.org/show_bug.cgi?id=39288 is fixed properly. Change-Id: Ie5cc610b841798e42ec1232b4af7674ce425b2c4
Diffstat (limited to 'WebCore/page/Geolocation.cpp')
-rw-r--r--WebCore/page/Geolocation.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 7dcf0a1..13bc02a 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -221,12 +221,25 @@ Geolocation::~Geolocation()
{
}
+#if PLATFORM(ANDROID)
+void Geolocation::stop()
+{
+ m_oneShots.clear();
+ m_watchers.clear();
+ stopUpdating();
+}
+#endif // PLATFORM(ANDROID)
+
void Geolocation::disconnectFrame()
{
if (m_frame && m_frame->page() && m_allowGeolocation == InProgress)
m_frame->page()->chrome()->cancelGeolocationPermissionRequestForFrame(m_frame, this);
+#if PLATFORM(ANDROID)
+ // See Geolocation::stop()
+#else
stopTimers();
stopUpdating();
+#endif // PLATFORM(ANDROID)
if (m_frame && m_frame->document())
m_frame->document()->setUsingGeolocation(false);
m_frame = 0;
@@ -683,6 +696,10 @@ Geolocation::~Geolocation() {}
void Geolocation::setIsAllowed(bool) {}
+#if PLATFORM(ANDROID)
+void Geolocation::stop() {}
+#endif // PLATFORM(ANDROID)
+
}
#endif // ENABLE(GEOLOCATION)