Changeset 152483 in webkit


Ignore:
Timestamp:
Jul 8, 2013 10:39:16 PM (11 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] webkit_set_cache_model is not turning the cache off
https://bugs.webkit.org/show_bug.cgi?id=118345

Reviewed by Gustavo Noronha Silva.

Our documentation says that WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER
disables the cache completely, but we are only setting the cache
capacities to 0. Cache capacities are not checked when resources
are added to the cache, but when it's pruned. To disable the cache
we need to call MemoryCache::setDisabled explicitly.

  • webkit/webkitglobals.cpp:

(webkit_set_cache_model): Disable the cache when min dead, max
dead and total capacities are all set to 0.

Location:
trunk/Source/WebKit/gtk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/gtk/ChangeLog

    r152446 r152483  
     12013-07-08  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] webkit_set_cache_model is not turning the cache off
     4        https://bugs.webkit.org/show_bug.cgi?id=118345
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        Our documentation says that WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER
     9        disables the cache completely, but we are only setting the cache
     10        capacities to 0. Cache capacities are not checked when resources
     11        are added to the cache, but when it's pruned. To disable the cache
     12        we need to call MemoryCache::setDisabled explicitly.
     13
     14        * webkit/webkitglobals.cpp:
     15        (webkit_set_cache_model): Disable the cache when min dead, max
     16        dead and total capacities are all set to 0.
     17
    1182013-07-08  Brian Holt  <brian.holt@samsung.com>
    219
  • trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp

    r152275 r152483  
    157157    }
    158158
     159    bool disableCache = !cacheMinDeadCapacity && !cacheMaxDeadCapacity && !cacheTotalCapacity;
     160    memoryCache()->setDisabled(disableCache);
    159161    memoryCache()->setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
    160162    memoryCache()->setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
Note: See TracChangeset for help on using the changeset viewer.