Bug 50462 - [GTK] webkit_soup_cache_clear() does not delete all entries in the cache
Summary: [GTK] webkit_soup_cache_clear() does not delete all entries in the cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2010-12-03 10:19 PST by Sergio Villar Senin
Modified: 2010-12-06 01:44 PST (History)
1 user (show)

See Also:


Attachments
Fix for the bug (4.29 KB, patch)
2010-12-03 10:41 PST, Sergio Villar Senin
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2010-12-03 10:19:28 PST
The problem is that we're removing entries in the callback of g_hash_table_foreach, something that is obviously wrong
Comment 1 Sergio Villar Senin 2010-12-03 10:41:15 PST
Created attachment 75510 [details]
Fix for the bug
Comment 2 Martin Robinson 2010-12-05 15:48:04 PST
Is it possible to simply use g_hash_table_remove_all?
Comment 3 Sergio Villar Senin 2010-12-06 01:09:52 PST
(In reply to comment #2)
> Is it possible to simply use g_hash_table_remove_all?

Not really because it could happen that we might decide not to remove some item from the cache for example if some entry is dirty. We cannot also use g_hash_table_remove without changing the logic of webkit_soup_cache_entry_remove either.
Comment 4 Martin Robinson 2010-12-06 01:21:10 PST
Comment on attachment 75510 [details]
Fix for the bug

Yay!
Comment 5 Sergio Villar Senin 2010-12-06 01:44:01 PST
Committed r73350: <http://trac.webkit.org/changeset/73350>