Summary: | [GTK][EFL] Disk cache is never dumped to disk in WebKit2 | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cdumez, danw, gyuyoung.kim, mrobinson, rakuco, svillar, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Bug Depends on: | 97580 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Carlos Garcia Campos
2012-09-25 11:27:09 PDT
Created attachment 165647 [details]
Patch
Comment on attachment 165647 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=165647&action=review > Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:107 > + soup_cache_flush(soupCache); > + soup_cache_dump(soupCache); > + g_object_unref(soupCache); > + I'm surprised that g_object_unref doesn't flush and dump the cache as a side-effect. Maybe Dan or Sergio can comment on that? If that's the case, we can just call g_object_unref here. > Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:90 > + soup_cache_flush(soupCache.get()); > + soup_cache_dump(soupCache.get()); > + Assuming that the soup cache destructor takes care of this, this could just become: soupCache = nullptr; And with a comment explaining why it's important to do that. (In reply to comment #2) > (From update of attachment 165647 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=165647&action=review > > > Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp:107 > > + soup_cache_flush(soupCache); > > + soup_cache_dump(soupCache); > > + g_object_unref(soupCache); > > + > > I'm surprised that g_object_unref doesn't flush and dump the cache as a side-effect. Maybe Dan or Sergio can comment on that? If that's the case, we can just call g_object_unref here. No, finalize() only frees the internal hash table, but the cache needs to be flushed and dumped manually. Serio told me it's expected to be done when the process finishes and the cache is not going to be used more, because there isn't a way to block the cache while flush/dump. Committed r129541: <http://trac.webkit.org/changeset/129541> |