Changeset 197141 in webkit


Ignore:
Timestamp:
Feb 25, 2016 3:24:41 PM (8 years ago)
Author:
akling@apple.com
Message:

Don't clear the weak JSString cache on memory pressure.
<https://webkit.org/b/154693>

Reviewed by Antti Koivisto.

This was stupid. The cache is a WeakGCMap, so all the JSStrings pointed to are
still alive anyway. This way we keep the ability to deduplicate common strings.

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::releaseNoncriticalMemory): Deleted.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r197139 r197141  
     12016-02-25  Andreas Kling  <akling@apple.com>
     2
     3        Don't clear the weak JSString cache on memory pressure.
     4        <https://webkit.org/b/154693>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        This was stupid. The cache is a WeakGCMap, so all the JSStrings pointed to are
     9        still alive anyway. This way we keep the ability to deduplicate common strings.
     10
     11        * platform/MemoryPressureHandler.cpp:
     12        (WebCore::MemoryPressureHandler::releaseNoncriticalMemory): Deleted.
     13
    1142016-02-25  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebCore/platform/MemoryPressureHandler.cpp

    r196753 r197141  
    9797
    9898    {
    99         ReliefLogger log("Clearing JS string cache");
    100         JSDOMWindow::commonVM().stringCache.clear();
    101     }
    102 
    103     {
    10499        ReliefLogger log("Prune MemoryCache dead resources");
    105100        MemoryCache::singleton().pruneDeadResourcesToSize(0);
Note: See TracChangeset for help on using the changeset viewer.