summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2009-12-01 09:15:50 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-01 09:15:50 -0800
commit2420edd43645681f6b6f4ea17a65e710bd64d1db (patch)
tree071523a5bcddc075a725509f1a2da05315d23e9d /WebKit/android/jni/WebViewCore.cpp
parent1cdd08a6beda8c5cb12ae857bb0ed4f34c1324b7 (diff)
parentafbff3f52cb0fd1c342805daaaf3a89320bb3caa (diff)
downloadexternal_webkit-2420edd43645681f6b6f4ea17a65e710bd64d1db.zip
external_webkit-2420edd43645681f6b6f4ea17a65e710bd64d1db.tar.gz
external_webkit-2420edd43645681f6b6f4ea17a65e710bd64d1db.tar.bz2
am afbff3f5: am c1cf958c: cleaning up local JNI references for plugins and caching appropriate JNI ids.
Merge commit 'afbff3f52cb0fd1c342805daaaf3a89320bb3caa' * commit 'afbff3f52cb0fd1c342805daaaf3a89320bb3caa': cleaning up local JNI references for plugins and caching appropriate JNI ids.
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 ea4b484..ea8793e 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -2330,6 +2330,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 {
@@ -2350,6 +2354,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;
}