aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-history.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-12-18 20:48:45 +0800
committerChristian Persch <chpe@src.gnome.org>2003-12-18 20:48:45 +0800
commitc901db685d7e02b9fc45f38fa57d8e40f54a1236 (patch)
tree4e37c7223b70b250fc0ef593a577a2932be8e8a0 /embed/ephy-history.c
parent67bda39038345eb5632668f5251bd925f04431ec (diff)
downloadgsoc2013-epiphany-c901db685d7e02b9fc45f38fa57d8e40f54a1236.tar
gsoc2013-epiphany-c901db685d7e02b9fc45f38fa57d8e40f54a1236.tar.gz
gsoc2013-epiphany-c901db685d7e02b9fc45f38fa57d8e40f54a1236.tar.bz2
gsoc2013-epiphany-c901db685d7e02b9fc45f38fa57d8e40f54a1236.tar.lz
gsoc2013-epiphany-c901db685d7e02b9fc45f38fa57d8e40f54a1236.tar.xz
gsoc2013-epiphany-c901db685d7e02b9fc45f38fa57d8e40f54a1236.tar.zst
gsoc2013-epiphany-c901db685d7e02b9fc45f38fa57d8e40f54a1236.zip
Fix freeze bug 129413.
2003-12-18 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-favicon-cache.c: (icons_added_cb), (icons_removed_cb), (remove_obsolete_icons), (ephy_favicon_cache_save), (ephy_favicon_cache_init), (kill_download), (ephy_favicon_cache_finalize), (ephy_favicon_cache_get): * embed/ephy-history.c: (ephy_history_autocompletion_source_foreach), (remove_obsolete_pages), (ephy_history_save), (hosts_added_cb), (hosts_removed_cb), (pages_added_cb), (pages_removed_cb), (update_host_on_child_remove), (update_hosts), (ephy_history_init), (ephy_history_finalize), (ephy_history_add_host), (ephy_history_get_page): * lib/Makefile.am: * lib/ephy-node-db.c: (ephy_node_db_init), (ephy_node_db_finalize), (ephy_node_db_get_node_from_id), (_ephy_node_db_new_id), (_ephy_node_db_add_id), (_ephy_node_db_remove_id): * lib/ephy-node-filter.c: (ephy_node_filter_expression_evaluate): * lib/ephy-node.c: (ephy_node_finalize), (real_remove_child), (remove_child), (ephy_node_dispose), (ephy_node_new_with_id), (ephy_node_get_id), (ephy_node_ref), (ephy_node_unref), (child_changed), (ephy_node_set_property), (ephy_node_get_property), (ephy_node_get_property_string), (ephy_node_get_property_boolean), (ephy_node_get_property_long), (ephy_node_get_property_int), (ephy_node_get_property_double), (ephy_node_get_property_float), (ephy_node_get_property_node), (save_parent), (ephy_node_save_to_xml), (ephy_node_add_child), (ephy_node_remove_child), (ephy_node_has_child), (ephy_node_sort_children), (ephy_node_reorder_children), (ephy_node_get_children), (ephy_node_get_n_children), (ephy_node_get_nth_child), (ephy_node_get_child_index), (ephy_node_get_next_child), (ephy_node_get_previous_child): * lib/ephy-node.h: * lib/ephy-state.c: (ephy_states_save), (find_by_name): * lib/ephy-thread-helpers.c: * lib/ephy-thread-helpers.h: * lib/widgets/ephy-tree-model-node.c: (filter_changed_cb): * src/bookmarks/ephy-bookmarks-editor.c: (search_entry_search_cb): * src/bookmarks/ephy-bookmarks-export.c: (add_topics_list), (ephy_bookmarks_export_rdf): * src/bookmarks/ephy-bookmarks-menu.c: (add_bookmarks_menu), (ephy_bookmarks_menu_rebuild): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_autocompletion_source_foreach), (ephy_bookmarks_save), (compute_lower_fav), (get_topics_list), (topics_removed_cb), (ephy_bookmarks_find_bookmark), (ephy_bookmarks_find_keyword): * src/bookmarks/ephy-topic-action.c: (append_bookmarks_menu), (build_topics_menu): * src/bookmarks/ephy-topics-selector.c: (fill_model): * src/ephy-favorites-menu.c: (ephy_favorites_menu_rebuild): * src/ephy-history-window.c: (search_entry_search_cb): * src/ephy-shell.c: (ephy_shell_init): Fix freeze bug 129413.
Diffstat (limited to 'embed/ephy-history.c')
-rw-r--r--embed/ephy-history.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index 659d8404b..d336520c7 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -49,9 +49,7 @@ struct EphyHistoryPrivate
EphyNode *pages;
EphyNode *last_page;
GHashTable *hosts_hash;
- GStaticRWLock *hosts_hash_lock;
GHashTable *pages_hash;
- GStaticRWLock *pages_hash_lock;
int autosave_timeout;
guint update_hosts_idle;
};
@@ -162,7 +160,6 @@ ephy_history_autocompletion_source_foreach (EphyAutocompletionSource *source,
url, url, FALSE,
FALSE, score, data);
}
- ephy_node_thaw (eb->priv->pages);
}
static void
@@ -256,7 +253,6 @@ remove_obsolete_pages (EphyHistory *eb)
g_date_set_time (&current_date, time (NULL));
children = ephy_node_get_children (eb->priv->pages);
- ephy_node_thaw (eb->priv->pages);
for (i = 0; i < children->len; i++)
{
EphyNode *kid;
@@ -298,7 +294,6 @@ ephy_history_save (EphyHistory *eb)
ephy_node_save_to_xml (kid, root);
}
- ephy_node_thaw (eb->priv->hosts);
children = ephy_node_get_children (eb->priv->pages);
for (i = 0; i < children->len; i++)
@@ -309,7 +304,6 @@ ephy_history_save (EphyHistory *eb)
ephy_node_save_to_xml (kid, root);
}
- ephy_node_thaw (eb->priv->pages);
ephy_file_save_xml (eb->priv->xml_file, doc);
xmlFreeDoc(doc);
@@ -320,13 +314,9 @@ hosts_added_cb (EphyNode *node,
EphyNode *child,
EphyHistory *eb)
{
- g_static_rw_lock_writer_lock (eb->priv->hosts_hash_lock);
-
g_hash_table_insert (eb->priv->hosts_hash,
(char *) ephy_node_get_property_string (child, EPHY_NODE_PAGE_PROP_LOCATION),
child);
-
- g_static_rw_lock_writer_unlock (eb->priv->hosts_hash_lock);
}
static void
@@ -335,12 +325,8 @@ hosts_removed_cb (EphyNode *node,
guint old_index,
EphyHistory *eb)
{
- g_static_rw_lock_writer_lock (eb->priv->hosts_hash_lock);
-
g_hash_table_remove (eb->priv->hosts_hash,
ephy_node_get_property_string (child, EPHY_NODE_PAGE_PROP_LOCATION));
-
- g_static_rw_lock_writer_unlock (eb->priv->hosts_hash_lock);
}
static void
@@ -348,13 +334,9 @@ pages_added_cb (EphyNode *node,
EphyNode *child,
EphyHistory *eb)
{
- g_static_rw_lock_writer_lock (eb->priv->pages_hash_lock);
-
g_hash_table_insert (eb->priv->pages_hash,
(char *) ephy_node_get_property_string (child, EPHY_NODE_PAGE_PROP_LOCATION),
child);
-
- g_static_rw_lock_writer_unlock (eb->priv->pages_hash_lock);
}
static void
@@ -363,12 +345,8 @@ pages_removed_cb (EphyNode *node,
guint old_index,
EphyHistory *eb)
{
- g_static_rw_lock_writer_lock (eb->priv->pages_hash_lock);
-
g_hash_table_remove (eb->priv->pages_hash,
ephy_node_get_property_string (child, EPHY_NODE_PAGE_PROP_LOCATION));
-
- g_static_rw_lock_writer_unlock (eb->priv->pages_hash_lock);
}
static gboolean
@@ -405,7 +383,6 @@ update_host_on_child_remove (EphyNode *node)
new_host_last_visit = last_visit;
}
}
- ephy_node_thaw (node);
if (host_last_visit != new_host_last_visit)
{
@@ -445,7 +422,6 @@ update_hosts (EphyHistory *eh)
}
}
}
- ephy_node_thaw (eh->priv->hosts);
g_list_foreach (empty, (GFunc)ephy_node_unref, NULL);
g_list_free (empty);
@@ -500,13 +476,8 @@ ephy_history_init (EphyHistory *eb)
eb->priv->pages_hash = g_hash_table_new (g_str_hash,
g_str_equal);
- eb->priv->pages_hash_lock = g_new0 (GStaticRWLock, 1);
- g_static_rw_lock_init (eb->priv->pages_hash_lock);
-
eb->priv->hosts_hash = g_hash_table_new (g_str_hash,
g_str_equal);
- eb->priv->hosts_hash_lock = g_new0 (GStaticRWLock, 1);
- g_static_rw_lock_init (eb->priv->hosts_hash_lock);
/* Pages */
eb->priv->pages = ephy_node_new_with_id (db, PAGES_NODE_ID);
@@ -587,9 +558,7 @@ ephy_history_finalize (GObject *object)
g_object_unref (eb->priv->db);
g_hash_table_destroy (eb->priv->pages_hash);
- g_static_rw_lock_free (eb->priv->pages_hash_lock);
g_hash_table_destroy (eb->priv->hosts_hash);
- g_static_rw_lock_free (eb->priv->hosts_hash_lock);
g_source_remove (eb->priv->autosave_timeout);
@@ -701,15 +670,12 @@ ephy_history_add_host (EphyHistory *eh, EphyNode *page)
g_return_val_if_fail (host_locations != NULL, NULL);
- g_static_rw_lock_reader_lock (eh->priv->hosts_hash_lock);
-
for (l = host_locations; l != NULL; l = l->next)
{
host = g_hash_table_lookup (eh->priv->hosts_hash,
(char *)l->data);
if (host) break;
}
- g_static_rw_lock_reader_unlock (eh->priv->hosts_hash_lock);
if (!host)
{
@@ -868,9 +834,7 @@ ephy_history_get_page (EphyHistory *eb,
{
EphyNode *node;
- g_static_rw_lock_reader_lock (eb->priv->pages_hash_lock);
node = g_hash_table_lookup (eb->priv->pages_hash, url);
- g_static_rw_lock_reader_unlock (eb->priv->pages_hash_lock);
return node;
}