summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index bc650ad..4372171 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -2456,6 +2456,10 @@ jclass WebViewCore::getPluginClass(const WebCore::String& libName, const char* c
libString, classString);
checkException(env);
+ // cleanup unneeded local JNI references
+ env->DeleteLocalRef(libString);
+ env->DeleteLocalRef(classString);
+
if (pluginClass != NULL) {
return static_cast<jclass>(pluginClass);
} else {
@@ -2476,6 +2480,10 @@ jobject WebViewCore::createPluginJavaInstance(const WebCore::String& libName, NP
jobject result = env->CallObjectMethod(obj.get(),
m_javaGlue->m_createPluginJavaInstance,
libString, (int) npp);
+
+ //cleanup unneeded local JNI references
+ env->DeleteLocalRef(libString);
+
checkException(env);
return result;
}