summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/WebKit/android/WebCoreSupport/UrlInterceptResponse.cpp2
-rw-r--r--Source/WebKit/android/jni/WebCoreFrameBridge.cpp4
2 files changed, 5 insertions, 1 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);
}
diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
index bdb502e..9648075 100644
--- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -525,7 +525,9 @@ WebFrame::shouldInterceptRequest(const WTF::String& url)
env->DeleteLocalRef(urlStr);
if (response == 0)
return 0;
- return new UrlInterceptResponse(env, response);
+ UrlInterceptResponse* result = new UrlInterceptResponse(env, response);
+ env->DeleteLocalRef(response);
+ return result;
}
void