diff options
author | Kristian Monsen <kristianm@google.com> | 2011-08-25 20:33:21 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-09-02 02:09:30 +0100 |
commit | 76859bf6d78119b2bf4fe2aa2c2a4761fa90503c (patch) | |
tree | d43211938e817ca1e103dc22972c4243835fb806 /Source/WebKit/android/jni | |
parent | b6b02e9acdbe69eeecb5416f6019f80f8a443350 (diff) | |
download | external_webkit-76859bf6d78119b2bf4fe2aa2c2a4761fa90503c.zip external_webkit-76859bf6d78119b2bf4fe2aa2c2a4761fa90503c.tar.gz external_webkit-76859bf6d78119b2bf4fe2aa2c2a4761fa90503c.tar.bz2 |
Closing idle connections, including jni interface
Part of fix for bug 4487538 Current Drain
Change-Id: Ib08ea52c1c71726b76a5811663b6990aa13146ad
Diffstat (limited to 'Source/WebKit/android/jni')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 3ad8ab2..9b5a6fa 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -113,6 +113,7 @@ #include "SkUtils.h" #include "Text.h" #include "TypingCommand.h" +#include "WebCache.h" #include "WebCoreFrameBridge.h" #include "WebFrameView.h" #include "WindowsKeyboardCodes.h" @@ -4616,6 +4617,14 @@ static void AutoFillForm(JNIEnv* env, jobject obj, jint queryId) #endif } +static void CloseIdleConnections(JNIEnv* env, jobject obj) +{ +#if USE(CHROME_NETWORK_STACK) + WebCache::get(true)->closeIdleConnections(); + WebCache::get(false)->closeIdleConnections(); +#endif +} + static void ScrollRenderLayer(JNIEnv* env, jobject obj, jint layer, jobject jRect) { SkRect rect; @@ -4735,6 +4744,8 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = { (void*) AutoFillForm }, { "nativeScrollLayer", "(ILandroid/graphics/Rect;)V", (void*) ScrollRenderLayer }, + { "nativeCloseIdleConnections", "()V", + (void*) CloseIdleConnections }, }; int registerWebViewCore(JNIEnv* env) |