summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge
diff options
context:
space:
mode:
authorPatrick Scott <>2009-03-24 22:46:47 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 22:46:47 -0700
commit469a7df2e8a310b163b244af6bcc308ab29f0a1c (patch)
treedbe17ab4edace69cc02a8bce1779700e5918c878 /WebCore/bridge
parentec1dd9995d33d4d707adc024a3d0e4bef6e48cee (diff)
downloadexternal_webkit-469a7df2e8a310b163b244af6bcc308ab29f0a1c.zip
external_webkit-469a7df2e8a310b163b244af6bcc308ab29f0a1c.tar.gz
external_webkit-469a7df2e8a310b163b244af6bcc308ab29f0a1c.tar.bz2
Automated import from //branches/master/...@142404,142404
Diffstat (limited to 'WebCore/bridge')
-rw-r--r--WebCore/bridge/jni/jni_class.cpp5
-rw-r--r--WebCore/bridge/jni/jni_runtime.cpp3
-rw-r--r--WebCore/bridge/jni/jni_utility.h3
3 files changed, 11 insertions, 0 deletions
diff --git a/WebCore/bridge/jni/jni_class.cpp b/WebCore/bridge/jni/jni_class.cpp
index 87750aa..4e3b5f9 100644
--- a/WebCore/bridge/jni/jni_class.cpp
+++ b/WebCore/bridge/jni/jni_class.cpp
@@ -85,6 +85,11 @@ JavaClass::JavaClass(jobject anInstance)
methodList->append(aMethod);
env->DeleteLocalRef(aJMethod);
}
+#ifdef ANDROID_FIX
+ env->DeleteLocalRef(fields);
+ env->DeleteLocalRef(methods);
+ env->DeleteLocalRef(aClass);
+#endif
}
JavaClass::~JavaClass() {
diff --git a/WebCore/bridge/jni/jni_runtime.cpp b/WebCore/bridge/jni/jni_runtime.cpp
index 932e56c..38d6d6c 100644
--- a/WebCore/bridge/jni/jni_runtime.cpp
+++ b/WebCore/bridge/jni/jni_runtime.cpp
@@ -284,6 +284,9 @@ JavaMethod::JavaMethod (JNIEnv *env, jobject aMethod)
jclass modifierClass = env->FindClass("java/lang/reflect/Modifier");
int modifiers = callJNIMethod<jint>(aMethod, "getModifiers", "()I");
_isStatic = (bool)callJNIStaticMethod<jboolean>(modifierClass, "isStatic", "(I)Z", modifiers);
+#ifdef ANDROID_FIX
+ env->DeleteLocalRef(modifierClass);
+#endif
}
JavaMethod::~JavaMethod()
diff --git a/WebCore/bridge/jni/jni_utility.h b/WebCore/bridge/jni/jni_utility.h
index a08cc5d..e76570c 100644
--- a/WebCore/bridge/jni/jni_utility.h
+++ b/WebCore/bridge/jni/jni_utility.h
@@ -216,6 +216,9 @@ static T callJNIMethodV(jobject obj, const char *name, const char *sig, va_list
jmethodID mid = env->GetMethodID(cls, name, sig);
if ( mid != NULL )
{
+#ifdef ANDROID_FIX // Avoids references to cls without popping the local frame.
+ env->DeleteLocalRef(cls);
+#endif
return JNICaller<T>::callV(obj, mid, args);
}
else