From 27009bcd4f0d3c6fb5f1324521a353c8fdfd168c Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 9 Jun 2010 11:21:20 +0100 Subject: 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 --- WebCore/page/Geolocation.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'WebCore/page/Geolocation.cpp') 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) -- cgit v1.1