svnno****@sourc*****
svnno****@sourc*****
Wed Sep 2 18:46:00 JST 2009
Revision: 3816 http://sourceforge.jp/projects/kazehakase/svn/view?view=rev&revision=3816 Author: ikezoe Date: 2009-09-02 18:46:00 +0900 (Wed, 02 Sep 2009) Log Message: ----------- * module/embed/per-process/kz-embed-process.c: Fix crash. * module/embed/per-process/kz-dbus-embed-delegate.c: Load history list after ready signal is received. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/module/embed/per-process/kz-dbus-embed-delegate.c kazehakase/trunk/module/embed/per-process/kz-embed-process.c Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2009-09-02 06:59:48 UTC (rev 3815) +++ kazehakase/trunk/ChangeLog 2009-09-02 09:46:00 UTC (rev 3816) @@ -15,6 +15,9 @@ module/embed/gecko/kz-gecko-embed.cpp, module/embed/webkit-gtk/kz-webkit-gtk.c: Fix kz_site_new arguments order. + * module/embed/per-process/kz-embed-process.c: Fix crash. + * module/embed/per-process/kz-dbus-embed-delegate.c: + Load history list after ready signal is received. 2009-09-01 Hiroyuki Ikezoe <poinc****@ikezo*****> Modified: kazehakase/trunk/module/embed/per-process/kz-dbus-embed-delegate.c =================================================================== --- kazehakase/trunk/module/embed/per-process/kz-dbus-embed-delegate.c 2009-09-02 06:59:48 UTC (rev 3815) +++ kazehakase/trunk/module/embed/per-process/kz-dbus-embed-delegate.c 2009-09-02 09:46:00 UTC (rev 3816) @@ -191,12 +191,17 @@ priv->ready = TRUE; if (priv->location) load_uri(KZ_EMBED(object), priv->location); -return TRUE; - org_kazehakase_Embed_set_history_async(priv->proxy, - (const gchar**)priv->titles, - (const gchar **)priv->uris, - priv->current_position, - cb_async, NULL); + if (priv->uris) { + org_kazehakase_Embed_set_history_async(priv->proxy, + (const gchar**)priv->titles, + (const gchar **)priv->uris, + priv->current_position, + cb_async, NULL); + g_strfreev(priv->titles); + g_strfreev(priv->uris); + priv->titles = NULL; + priv->uris = NULL; + } return TRUE; } Modified: kazehakase/trunk/module/embed/per-process/kz-embed-process.c =================================================================== --- kazehakase/trunk/module/embed/per-process/kz-embed-process.c 2009-09-02 06:59:48 UTC (rev 3815) +++ kazehakase/trunk/module/embed/per-process/kz-embed-process.c 2009-09-02 09:46:00 UTC (rev 3816) @@ -537,19 +537,23 @@ GList *node; GList *history = NULL; gint i, n_children; + gchar **ret_titles = NULL; + gchar **ret_uris = NULL; kz_embed_get_history(priv->embed, &history, current_position); n_children = g_list_length(history); - *titles = g_new0(gchar*, n_children + 1); - *uris = g_new0(gchar*, n_children + 1); + ret_titles = g_new0(gchar*, n_children + 1); + ret_uris = g_new0(gchar*, n_children + 1); for (node = g_list_first(history), i = 0; node; node = g_list_next(node), i++) { KzSite *site = (KzSite*)(node->data); - *titles[i] = g_strdup(site->title); - *uris[i] = g_strdup(site->uri); + ret_titles[i] = g_strdup(site->title); + ret_uris[i] = g_strdup(site->uri); } + *titles = ret_titles; + *uris = ret_uris; kz_site_list_free(history); return TRUE;