From 5fcdce675339c5c2cee9cf7890b84a4029c82501 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Thu, 4 Mar 2010 16:37:50 +0000 Subject: Fixes a leaked JNI local reference in MIMETypeRegistry::getMIMETypeForExtension This method was leaking a Java class object. This caused layout test fast/dom/prototype-inheritance-2.html to crash because the VM ran out of local references. Bug: 2218794 Change-Id: I15d6bb8bf16ec58ecd6470ef63e6cd3635d766ef --- WebKit/android/jni/MIMETypeRegistry.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'WebKit') diff --git a/WebKit/android/jni/MIMETypeRegistry.cpp b/WebKit/android/jni/MIMETypeRegistry.cpp index eec7af6..32f387d 100644 --- a/WebKit/android/jni/MIMETypeRegistry.cpp +++ b/WebKit/android/jni/MIMETypeRegistry.cpp @@ -52,6 +52,7 @@ String MIMETypeRegistry::getMIMETypeForExtension(const String& ext) jobject mimeType = env->CallStaticObjectMethod(mimeClass, mimeTypeFromExtension, extString); String result = android::to_string(env, (jstring) mimeType); + env->DeleteLocalRef(mimeClass); env->DeleteLocalRef(extString); env->DeleteLocalRef(mimeType); return result; -- cgit v1.1