WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 97583
[GTK][EFL] Disk cache is never dumped to disk in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=97583
Summary
[GTK][EFL] Disk cache is never dumped to disk in WebKit2
Carlos Garcia Campos
Reported
2012-09-25 11:27:09 PDT
The problem is that WebProcess::platformTerminate(), where the cache is currently dumped, is not always called for the reasons explained here
https://bugs.webkit.org/show_bug.cgi?id=94783
. The cache is created and loaded in the main() so it can also be flushed and dumped there, so that we also make sure it's always called when the process finishes normally when the mina loop quits.
Attachments
Patch
(3.41 KB, patch)
2012-09-25 11:30 PDT
,
Carlos Garcia Campos
mrobinson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2012-09-25 11:30:29 PDT
Created
attachment 165647
[details]
Patch
Martin Robinson
Comment 2
2012-09-25 11:35:04 PDT
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.
Carlos Garcia Campos
Comment 3
2012-09-25 11:39:48 PDT
(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.
Carlos Garcia Campos
Comment 4
2012-09-25 12:30:09 PDT
Committed
r129541
: <
http://trac.webkit.org/changeset/129541
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug