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
authorDoug Turner <dougt@dougt.org>
Thu, 01 Sep 2011 15:20:17 -0700
changeset 76423 d589ee7f704bd59e4d0c243c91728b041e5771a6
parent 76422 ca798b7e74efc33b5e20f0bcdf2fa2862d6e458d
child 76424 3959615183f608d31012335eb7632545e4b989a1
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersjdm
bugs683461
milestone9.0a1
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
--- a/widget/src/android/AndroidJNI.cpp
+++ b/widget/src/android/AndroidJNI.cpp
@@ -166,17 +166,16 @@ Java_org_mozilla_gecko_GeckoAppShell_onC
     nsJNIString sType(jType, jenv);
 
     nsAppShell::gAppShell->NotifyObservers(nsnull,
                                            NS_NETWORK_LINK_TYPE_TOPIC,
                                            sType.get());
 }
 
 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();
 }