From 76859bf6d78119b2bf4fe2aa2c2a4761fa90503c Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Thu, 25 Aug 2011 20:33:21 +0100 Subject: Closing idle connections, including jni interface Part of fix for bug 4487538 Current Drain Change-Id: Ib08ea52c1c71726b76a5811663b6990aa13146ad --- Source/WebKit/android/WebCoreSupport/WebCache.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Source/WebKit/android/WebCoreSupport/WebCache.cpp') diff --git a/Source/WebKit/android/WebCoreSupport/WebCache.cpp b/Source/WebKit/android/WebCoreSupport/WebCache.cpp index a15bf7f..3c49430 100644 --- a/Source/WebKit/android/WebCoreSupport/WebCache.cpp +++ b/Source/WebKit/android/WebCoreSupport/WebCache.cpp @@ -134,6 +134,18 @@ void WebCache::clear() thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this, &WebCache::clearImpl)); } +void WebCache::closeIdleConnections() +{ + base::Thread* thread = WebUrlLoaderClient::ioThread(); + if (thread) + thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this, &WebCache::closeIdleImpl)); +} + +void WebCache::closeIdleImpl() +{ + m_cache->CloseIdleConnections(); +} + void WebCache::clearImpl() { if (m_isClearInProgress) -- cgit v1.1