From c901db685d7e02b9fc45f38fa57d8e40f54a1236 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 18 Dec 2003 12:48:45 +0000 Subject: Fix freeze bug 129413. 2003-12-18 Christian Persch * 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. --- lib/ephy-node-db.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'lib/ephy-node-db.c') diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c index 86913d93c..1103918ea 100644 --- a/lib/ephy-node-db.c +++ b/lib/ephy-node-db.c @@ -37,10 +37,8 @@ struct EphyNodeDbPrivate { char *name; - GMutex *id_factory_lock; long id_factory; - GStaticRWLock *id_to_node_lock; GPtrArray *id_to_node; }; @@ -154,12 +152,8 @@ ephy_node_db_init (EphyNodeDb *db) /* id to node */ db->priv->id_to_node = g_ptr_array_new (); - db->priv->id_to_node_lock = g_new0 (GStaticRWLock, 1); - g_static_rw_lock_init (db->priv->id_to_node_lock); - /* id factory */ db->priv->id_factory = RESERVED_IDS; - db->priv->id_factory_lock = g_mutex_new (); } static void @@ -181,10 +175,6 @@ ephy_node_db_finalize (GObject *object) g_ptr_array_free (db->priv->id_to_node, FALSE); - g_static_rw_lock_free (db->priv->id_to_node_lock); - - g_mutex_free (db->priv->id_factory_lock); - g_free (db->priv->name); g_free (db->priv); @@ -238,12 +228,8 @@ ephy_node_db_get_node_from_id (EphyNodeDb *db, long id) { EphyNode *ret = NULL; - g_static_rw_lock_reader_lock (db->priv->id_to_node_lock); - ret = node_from_id_real (db, id); - g_static_rw_lock_reader_unlock (db->priv->id_to_node_lock); - return ret; } @@ -252,8 +238,6 @@ _ephy_node_db_new_id (EphyNodeDb *db) { long ret; - g_mutex_lock (db->priv->id_factory_lock); - while (node_from_id_real (db, db->priv->id_factory) != NULL) { db->priv->id_factory++; @@ -261,8 +245,6 @@ _ephy_node_db_new_id (EphyNodeDb *db) ret = db->priv->id_factory; - g_mutex_unlock (db->priv->id_factory_lock); - return ret; } @@ -271,27 +253,19 @@ _ephy_node_db_add_id (EphyNodeDb *db, long id, EphyNode *node) { - g_static_rw_lock_writer_lock (db->priv->id_to_node_lock); - /* resize array if needed */ if (id >= db->priv->id_to_node->len) g_ptr_array_set_size (db->priv->id_to_node, id + 1); g_ptr_array_index (db->priv->id_to_node, id) = node; - - g_static_rw_lock_writer_unlock (db->priv->id_to_node_lock); } void _ephy_node_db_remove_id (EphyNodeDb *db, long id) { - g_static_rw_lock_writer_lock (db->priv->id_to_node_lock); - g_ptr_array_index (db->priv->id_to_node, id) = NULL; /* reset id factory so we use the freed node id */ db->priv->id_factory = RESERVED_IDS; - - g_static_rw_lock_writer_unlock (db->priv->id_to_node_lock); } -- cgit v1.2.3