From 892f3b1f7fa649254f93aa83f98a92e5931dbedd Mon Sep 17 00:00:00 2001 From: Doug Turner Date: Thu, 1 Sep 2011 15:20:17 -0700 Subject: [PATCH] Bug 683461 - Attempt to fix the Java_org_mozilla_gecko_GeckoAppShell_reportJavaCrash crash. The thought is the string being contructed creates a jni env when it really shouldnt. r=jdm --- widget/src/android/AndroidJNI.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/widget/src/android/AndroidJNI.cpp b/widget/src/android/AndroidJNI.cpp index ec7c8cb3353..6aadc8e85e9 100644 --- a/widget/src/android/AndroidJNI.cpp +++ b/widget/src/android/AndroidJNI.cpp @@ -171,12 +171,11 @@ Java_org_mozilla_gecko_GeckoAppShell_onChangeNetworkLinkStatus(JNIEnv *jenv, jcl } NS_EXPORT void JNICALL -Java_org_mozilla_gecko_GeckoAppShell_reportJavaCrash(JNIEnv *, jclass, jstring stack) +Java_org_mozilla_gecko_GeckoAppShell_reportJavaCrash(JNIEnv *jenv, jclass, jstring stack) { #ifdef MOZ_CRASHREPORTER - nsJNIString javaStack(stack); - CrashReporter::AppendAppNotesToCrashReport( - NS_ConvertUTF16toUTF8(javaStack)); + nsJNIString javaStack(stack, jenv); + CrashReporter::AppendAppNotesToCrashReport(NS_ConvertUTF16toUTF8(javaStack)); #endif abort(); }