[evolution-patches] Mail patch to remove segv_redirect and fix a warning on exit



The segv_redirect stuff should not be necessary anymore since we do it
in the shell now.  The rest is just the standard "container != NULL"
bonobo stuff.

-- Ettore
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2721
diff -u -p -r1.2721 ChangeLog
--- ChangeLog	9 May 2003 17:11:08 -0000	1.2721
+++ ChangeLog	12 May 2003 19:05:49 -0000
@@ -1,3 +1,13 @@
+2003-05-12  Ettore Perazzoli  <ettore ximian com>
+
+	* component-factory.c (segv_redirect): Removed.
+	(make_factory): No need to set up the SIGSEGV redirect handler
+	here, since it's already done in the shell now, and it's in-proc.
+
+	* folder-browser-ui.c (folder_browser_ui_rm_all): Only do the
+	bonobo_ui_component() stuff if the component does have a
+	container.
+
 2003-05-08  Ettore Perazzoli  <ettore ximian com>
 
 	* mail-session.c (mail_session_set_interactive): Set the
Index: component-factory.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/component-factory.c,v
retrieving revision 1.322
diff -u -p -r1.322 component-factory.c
--- component-factory.c	7 Apr 2003 01:45:08 -0000	1.322
+++ component-factory.c	12 May 2003 19:05:49 -0000
@@ -1612,31 +1612,6 @@ factory (BonoboGenericFactory *factory,
 	return NULL;
 }
 
-/* The GNOME SEGV handler will lose if it's not run from the main Gtk
- * thread. So if we crash in another thread, redirect the signal.
- */
-static void (*gnome_segv_handler) (int);
-
-static GStaticMutex segv_mutex = G_STATIC_MUTEX_INIT;
-
-static void
-segv_redirect (int sig)
-{
-	if (pthread_self () == mail_gui_thread)
-		gnome_segv_handler (sig);
-	else {
-		pthread_kill (mail_gui_thread, sig);
-		/* We can't return from the signal handler or the
-		 * thread may SEGV again. But we can't pthread_exit,
-		 * because then the thread may get cleaned up before
-		 * bug-buddy can get a stack trace. So we block by
-		 * trying to lock a mutex we know is already locked.
-		 */
-		g_static_mutex_lock (&segv_mutex);
-	}
-}
-
-
 static Bonobo_Unknown
 make_factory (PortableServer_POA poa, const char *iid, gpointer impl_ptr, CORBA_Environment *ev)
 {
@@ -1644,21 +1619,6 @@ make_factory (PortableServer_POA poa, co
 	static int init = 0;
 
 	if (!init) {
-		sigaction (SIGSEGV, NULL, &osa);
-		if (osa.sa_handler != SIG_DFL) {
-			sa.sa_flags = 0;
-			sigemptyset (&sa.sa_mask);
-			sa.sa_handler = segv_redirect;
-			sigaction (SIGSEGV, &sa, NULL);
-			sigaction (SIGBUS, &sa, NULL);
-			sigaction (SIGFPE, &sa, NULL);
-			
-			sa.sa_handler = SIG_IGN;
-			sigaction (SIGXFSZ, &sa, NULL);
-			gnome_segv_handler = osa.sa_handler;
-			g_static_mutex_lock (&segv_mutex);
-		}
-		
 		/* init ? */
 		mail_config_init ();
 		mail_msg_init ();
Index: folder-browser-ui.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/folder-browser-ui.c,v
retrieving revision 1.78
diff -u -p -r1.78 folder-browser-ui.c
--- folder-browser-ui.c	30 Apr 2003 03:08:47 -0000	1.78
+++ folder-browser-ui.c	12 May 2003 19:05:49 -0000
@@ -649,10 +649,12 @@ void 
 folder_browser_ui_rm_all (FolderBrowser *fb)
 {
 	BonoboUIComponent *uic = fb->uicomp;
-	
-	bonobo_ui_component_rm (uic, "/", NULL);
- 	bonobo_ui_component_unset_container (uic, NULL);
-	
+
+	if (bonobo_ui_component_get_container (uic) != NULL) {
+		bonobo_ui_component_rm (uic, "/", NULL);
+		bonobo_ui_component_unset_container (uic, NULL);
+	}
+
 	if (fb->sensitise_state) {
 		g_hash_table_destroy (fb->sensitise_state);
 		fb->sensitise_state = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]