summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/WebCoreSupport/UrlInterceptResponse.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-07-06 13:14:52 +0100
committerSteve Block <steveblock@google.com>2011-07-06 13:31:36 +0100
commit1e3e46a731730c02d916ea805ec4b20191509282 (patch)
treed8bdf908ad38eb5878c2fc6039bd715563e39718 /Source/WebKit/android/WebCoreSupport/UrlInterceptResponse.cpp
parent63cbafa7c232a74163d9ed8030578be970cd25a9 (diff)
downloadexternal_webkit-1e3e46a731730c02d916ea805ec4b20191509282.zip
external_webkit-1e3e46a731730c02d916ea805ec4b20191509282.tar.gz
external_webkit-1e3e46a731730c02d916ea805ec4b20191509282.tar.bz2
Avoid leaking JNI local references in UrlInterceptResponse
Bug: 4509854 Change-Id: I70bd6b5f1ce32263b1f048a7bb5e732338e7297d
Diffstat (limited to 'Source/WebKit/android/WebCoreSupport/UrlInterceptResponse.cpp')
-rw-r--r--Source/WebKit/android/WebCoreSupport/UrlInterceptResponse.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/UrlInterceptResponse.cpp b/Source/WebKit/android/WebCoreSupport/UrlInterceptResponse.cpp
index 3779ba8..77e3c32 100644
--- a/Source/WebKit/android/WebCoreSupport/UrlInterceptResponse.cpp
+++ b/Source/WebKit/android/WebCoreSupport/UrlInterceptResponse.cpp
@@ -46,6 +46,7 @@ public:
LOG_ALWAYS_FATAL_IF(!m_read);
m_close = env->GetMethodID(inputStreamClass, "close", "()V");
LOG_ALWAYS_FATAL_IF(!m_close);
+ env->DeleteLocalRef(inputStreamClass);
}
~JavaInputStreamWrapper() {
@@ -112,6 +113,7 @@ UrlInterceptResponse::UrlInterceptResponse(JNIEnv* env, jobject response) {
}
env->DeleteLocalRef(javaResponse);
+ env->DeleteLocalRef(stream);
env->DeleteLocalRef(mimeStr);
env->DeleteLocalRef(encodingStr);
}