From c1cf958cf053d63e0f2a09d2af1ec2fafdd32cd9 Mon Sep 17 00:00:00 2001 From: Derek Sollenberger Date: Tue, 1 Dec 2009 10:53:06 -0500 Subject: cleaning up local JNI references for plugins and caching appropriate JNI ids. --- WebKit/android/jni/WebViewCore.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'WebKit/android/jni/WebViewCore.cpp') 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(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; } -- cgit v1.1