RESOLVED WONTFIX 136417
Pruning of live cached images should not remove images on the display.
https://bugs.webkit.org/show_bug.cgi?id=136417
Summary Pruning of live cached images should not remove images on the display.
Daewoong Jang
Reported 2014-08-31 06:38:02 PDT
This is the test case for bug https://bugs.webkit.org/show_bug.cgi?id=136259. Ensures images on the display won't be destroyed when the memory cache has exceeded its size limit.
Attachments
test case (4.15 KB, patch)
2014-08-31 06:40 PDT, Daewoong Jang
no flags
updated patch (80.97 KB, patch)
2014-09-01 18:10 PDT, Daewoong Jang
no flags
Daewoong Jang
Comment 1 2014-08-31 06:40:10 PDT
Created attachment 237427 [details] test case
Daewoong Jang
Comment 2 2014-09-01 18:10:24 PDT
Created attachment 237472 [details] updated patch
Darin Adler
Comment 3 2014-09-02 08:35:18 PDT
Comment on attachment 237472 [details] updated patch If this test successfully demonstrated the problem, then I would have expected it to fail on the EWS server, since the fix for the bug has not yet been uploaded to the server.
Daewoong Jang
Comment 4 2014-09-02 09:34:19 PDT
(In reply to comment #3) > (From update of attachment 237472 [details]) > If this test successfully demonstrated the problem, then I would have expected it to fail on the EWS server, since the fix for the bug has not yet been uploaded to the server. I'm not sure, since the problem only appeared on WinCairo WebKit with cURL enabled. I have tested this case on Win/OS X WebKit and they had no problem.
Pratik Solanki
Comment 5 2014-09-02 16:27:15 PDT
Comment on attachment 237472 [details] updated patch View in context: https://bugs.webkit.org/attachment.cgi?id=237472&action=review > LayoutTests/loader/prune-live-cached-image.html:41 > + <!-- Assumes capacity of WebCore::MemoryCache == 8M(Which is from WebCore::cDefaultCacheCapacity). --> It's actually much higher and is based on the amount of RAM on the machine. We call MemoryCache::setCapacities() to bump it up. For WebKit2, see Source/WebKit2/Shared/CacheModel.cpp. It also depends on the mode you're in e.g. Safari will have a bigger cache (128MB on a machine with more than 2GB RAM) than an app using a WKWebView (96MB). I tried hardcoding a limit of 8MB but was unable to reproduce the crash on Mac.
Daewoong Jang
Comment 6 2014-09-02 18:51:37 PDT
(In reply to comment #5) > (From update of attachment 237472 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=237472&action=review > > > LayoutTests/loader/prune-live-cached-image.html:41 > > + <!-- Assumes capacity of WebCore::MemoryCache == 8M(Which is from WebCore::cDefaultCacheCapacity). --> > > It's actually much higher and is based on the amount of RAM on the machine. We call MemoryCache::setCapacities() to bump it up. For WebKit2, see Source/WebKit2/Shared/CacheModel.cpp. It also depends on the mode you're in e.g. Safari will have a bigger cache (128MB on a machine with more than 2GB RAM) than an app using a WKWebView (96MB). > > I tried hardcoding a limit of 8MB but was unable to reproduce the crash on Mac. This test case is not meant to reproduce crash. The rectangle under the other rectangle will be displayed in all red if the built WebKit has the problem that I reported. I'll try to solve the thing with cache size you've mentioned about, but I don't believe OS X WebKit would have the problem that this test case verifies. Thank you for your help!
Daewoong Jang
Comment 7 2014-09-03 07:24:17 PDT
I'm thinking of updating test case, make it to set cache limit to exact amount of memory before run the test. However it seems there is not a way to do this in DumpRenderTree. What should I do? Should I have to implement a new function in TestRunner.cpp?
Gyuyoung Kim
Comment 8 2015-08-17 00:38:32 PDT
Comment on attachment 237472 [details] updated patch View in context: https://bugs.webkit.org/attachment.cgi?id=237472&action=review > LayoutTests/loader/prune-live-cached-image-expected.txt:4 > +Top and bottom should look the same. How does WTR know top and bottom result look same ? I wonder if you need to add image expected result too.
Gyuyoung Kim
Comment 9 2015-08-17 00:45:19 PDT
Comment on attachment 237472 [details] updated patch Regardless of my question, this patch is too out of date. So cleared review? from attachment 237472 [details] so that this bug does not appear in http://webkit.org/pending-review. Please upload new patch based on latest trunk if you want to get review again.
Note You need to log in before you can comment on or make changes to this bug.