aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@src.gnome.org>2003-12-17 01:29:43 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-12-17 01:29:43 +0800
commit7a407a918297b8c54ee79174aac54bc84de97d29 (patch)
tree2b23c9bb51f5b388861697b0470652ec5a5e1e44 /embed
parent7339c460e72364aad2de893ab3c13549efc01d9b (diff)
downloadgsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.gz
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.bz2
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.lz
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.xz
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.tar.zst
gsoc2013-epiphany-7a407a918297b8c54ee79174aac54bc84de97d29.zip
*** empty log message ***
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-encodings.c1
-rw-r--r--embed/ephy-favicon-cache.c18
-rw-r--r--embed/ephy-history.c33
3 files changed, 0 insertions, 52 deletions
diff --git a/embed/ephy-encodings.c b/embed/ephy-encodings.c
index 8373ae52c..c50ba19c2 100644
--- a/embed/ephy-encodings.c
+++ b/embed/ephy-encodings.c
@@ -259,7 +259,6 @@ ephy_encodings_get_encodings (EphyEncodings *encodings,
list = g_list_prepend (list, kid);
}
}
- ephy_node_thaw (encodings->priv->encodings);
return list;
}
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index 4da3ab2e8..3421e1ce5 100644
--- a/embed/ephy-favicon-cache.c
+++ b/embed/ephy-favicon-cache.c
@@ -50,7 +50,6 @@ struct EphyFaviconCachePrivate
EphyNodeDb *db;
EphyNode *icons;
GHashTable *icons_hash;
- GStaticRWLock *icons_hash_lock;
GHashTable *downloads_hash;
};
@@ -142,13 +141,9 @@ icons_added_cb (EphyNode *node,
EphyNode *child,
EphyFaviconCache *eb)
{
- g_static_rw_lock_writer_lock (eb->priv->icons_hash_lock);
-
g_hash_table_insert (eb->priv->icons_hash,
(char *) ephy_node_get_property_string (child, EPHY_NODE_FAVICON_PROP_URL),
child);
-
- g_static_rw_lock_writer_unlock (eb->priv->icons_hash_lock);
}
static void
@@ -156,12 +151,8 @@ icons_removed_cb (EphyNode *node,
EphyNode *child,
EphyFaviconCache *eb)
{
- g_static_rw_lock_writer_lock (eb->priv->icons_hash_lock);
-
g_hash_table_remove (eb->priv->icons_hash,
ephy_node_get_property_string (child, EPHY_NODE_FAVICON_PROP_URL));
-
- g_static_rw_lock_writer_unlock (eb->priv->icons_hash_lock);
}
static void
@@ -177,7 +168,6 @@ remove_obsolete_icons (EphyFaviconCache *eb)
g_date_set_time (&current_date, time (NULL));
children = ephy_node_get_children (eb->priv->icons);
- ephy_node_thaw (eb->priv->icons);
for (i = 0; i < children->len; i++)
{
EphyNode *kid;
@@ -227,8 +217,6 @@ ephy_favicon_cache_init (EphyFaviconCache *cache)
cache->priv->icons_hash = g_hash_table_new (g_str_hash,
g_str_equal);
- cache->priv->icons_hash_lock = g_new0 (GStaticRWLock, 1);
- g_static_rw_lock_init (cache->priv->icons_hash_lock);
cache->priv->downloads_hash = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
@@ -263,9 +251,7 @@ kill_download (gpointer key,
ephy_embed_persist_cancel (persist);
g_object_unref (persist);
- g_static_rw_lock_reader_lock (cache->priv->icons_hash_lock);
icon = g_hash_table_lookup (cache->priv->icons_hash, (char *)key);
- g_static_rw_lock_reader_unlock (cache->priv->icons_hash_lock);
ephy_node_unref (icon);
@@ -300,8 +286,6 @@ ephy_favicon_cache_finalize (GObject *object)
g_free (cache->priv->xml_file);
g_free (cache->priv->directory);
g_hash_table_destroy (cache->priv->icons_hash);
- g_static_rw_lock_free (cache->priv->icons_hash_lock);
- g_free (cache->priv->icons_hash_lock);
g_hash_table_destroy (cache->priv->downloads_hash);
g_object_unref (cache->priv->db);
@@ -390,9 +374,7 @@ ephy_favicon_cache_get (EphyFaviconCache *cache,
now = time (NULL);
- g_static_rw_lock_reader_lock (cache->priv->icons_hash_lock);
icon = g_hash_table_lookup (cache->priv->icons_hash, url);
- g_static_rw_lock_reader_unlock (cache->priv->icons_hash_lock);
if (!icon)
{
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index 666e6b4e6..8aae3eaf0 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -52,9 +52,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;
gboolean dirty;
@@ -160,7 +158,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;
@@ -211,13 +208,9 @@ hosts_added_cb (EphyNode *node,
{
eb->priv->dirty = TRUE;
- 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
@@ -228,12 +221,8 @@ hosts_removed_cb (EphyNode *node,
{
eb->priv->dirty = TRUE;
- 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
@@ -251,13 +240,9 @@ pages_added_cb (EphyNode *node,
{
eb->priv->dirty = TRUE;
- 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
@@ -268,12 +253,8 @@ pages_removed_cb (EphyNode *node,
{
eb->priv->dirty = TRUE;
- 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 void
@@ -318,7 +299,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)
{
@@ -358,7 +338,6 @@ update_hosts (EphyHistory *eh)
}
}
}
- ephy_node_thaw (eh->priv->hosts);
g_list_foreach (empty, (GFunc)ephy_node_unref, NULL);
g_list_free (empty);
@@ -412,13 +391,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);
@@ -505,9 +479,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);
@@ -626,15 +598,12 @@ ephy_history_get_host (EphyHistory *eh, const char *url)
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)
{
@@ -792,9 +761,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;
}