[Xfce4-commits] <midori:master> Don't load the soup session in idle callback

Christian Dywan noreply at xfce.org
Sat Apr 16 04:28:01 CEST 2011


Updating branch refs/heads/master
         to 0925d31985cd5a79a367db51922dd784fa12ce6d (commit)
       from 08b756b0a67515f8b23d2e94570b7d744a3580d4 (commit)

commit 0925d31985cd5a79a367db51922dd784fa12ce6d
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Apr 16 04:26:28 2011 +0200

    Don't load the soup session in idle callback
    
    Otherwise there's a race condition which may lead to
    not having setup the session before loading the first
    page or worse, crash in libSoup.

 midori/main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 132b72e..91ca911 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -1228,6 +1228,8 @@ midori_load_soup_session_full (gpointer settings)
     gchar* config_file;
     SoupSessionFeature* feature;
 
+    midori_load_soup_session (settings);
+
     config_file = build_config_filename ("logins");
     feature = g_object_new (KATZE_TYPE_HTTP_AUTH, "filename", config_file, NULL);
     g_free (config_file);
@@ -1246,8 +1248,6 @@ midori_load_soup_session_full (gpointer settings)
     soup_session_add_feature (session, feature);
     g_object_unref (feature);
 
-    g_idle_add (midori_load_soup_session, settings);
-
     return FALSE;
 }
 
@@ -2267,7 +2267,7 @@ main (int    argc,
                 G_CALLBACK (midori_soup_session_block_uris_cb),
                 g_strdup (block_uris));
         midori_setup_inactivity_reset (browser, inactivity_reset, webapp);
-        g_idle_add (midori_load_soup_session, settings);
+        midori_load_soup_session (settings);
         midori_startup_timer ("App created: \t%f");
         gtk_main ();
         return 0;



More information about the Xfce4-commits mailing list