patches/glib-java-01-registerLogHandler.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 13496 dfdaa6c1d2f4
permissions -rwxr-xr-x
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13496
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
     1
diff -uNr glib-java-0.4.2.orig/src/jni/org_gnu_glib_GObject.c glib-java-0.4.2/src/jni/org_gnu_glib_GObject.c
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
     2
--- glib-java-0.4.2.orig/src/jni/org_gnu_glib_GObject.c	2008-09-04 15:54:32.666613782 +0100
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
     3
+++ glib-java-0.4.2/src/jni/org_gnu_glib_GObject.c	2008-09-04 15:54:45.516326561 +0100
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
     4
@@ -794,6 +794,8 @@
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
     5
 JNIEXPORT void JNICALL Java_org_gnu_glib_GObject_registerLogHandler
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
     6
     (JNIEnv *env, jclass cls)
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
     7
 {
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
     8
+/* #6728675: glib-java's JNI abuse causes jvm crashes when glib logs - Workaround, just stub out logging
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
     9
+
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    10
 	g_log_set_handler(NULL, G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL |
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    11
 			G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, logFunc, (gpointer)env);
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    12
 	g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    13
@@ -806,6 +808,7 @@
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    14
                      | G_LOG_FLAG_RECURSION, logFunc, (gpointer) env);
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    15
 	g_log_set_handler ("Glade", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    16
                      | G_LOG_FLAG_RECURSION, logFunc, (gpointer) env);
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    17
+*/
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    18
 }
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    19
 
dfdaa6c1d2f4 2008-09-10 John Rice <[email protected]>
migi
parents:
diff changeset
    20
 JNIEXPORT jobject JNICALL Java_org_gnu_glib_GObject_g_1object_1new