Changeset 87330 in webkit
- Timestamp:
- May 25, 2011 4:05:29 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r87329 r87330 1 2011-05-25 Michael Saboff <msaboff@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Cleanup of commented items from https://bugs.webkit.org/show_bug.cgi?id=61222 6 https://bugs.webkit.org/show_bug.cgi?id=61478 7 8 Cleanup of further comments after patch was landed. Changes include 9 using /2 instead of >>1, adding a blank line after class include, 10 making method names start with lower case and adding clarifying 11 comments. 12 13 No new tests as the changes are stylistic and not functional. 14 15 * loader/cache/MemoryCache.cpp: 16 (WebCore::MemoryCache::pruneLiveResourcesToPercentage): 17 (WebCore::MemoryCache::pruneDeadResourcesToPercentage): 18 * loader/cache/MemoryCache.h: 19 (WebCore::MemoryCache::pruneToPercentage): 20 * platform/mac/MemoryPressureHandlerMac.mm: 21 (WebCore::MemoryPressureHandler::respondToMemoryPressure): 22 1 23 2011-05-25 Stephanie Lewis <slewis@apple.com> 2 24 -
trunk/Source/WebCore/loader/cache/MemoryCache.cpp
r87239 r87330 177 177 } 178 178 179 void MemoryCache:: PruneLiveResourcesToPercentage(float prunePercentage)179 void MemoryCache::pruneLiveResourcesToPercentage(float prunePercentage) 180 180 { 181 181 if (!m_pruneEnabled) … … 240 240 } 241 241 242 void MemoryCache:: PruneDeadResourcesToPercentage(float prunePercentage)242 void MemoryCache::pruneDeadResourcesToPercentage(float prunePercentage) 243 243 { 244 244 if (!m_pruneEnabled) -
trunk/Source/WebCore/loader/cache/MemoryCache.h
r87228 r87330 142 142 void pruneToPercentage(float targetPercentLive) 143 143 { 144 PruneDeadResourcesToPercentage(targetPercentLive); // Prune dead first, in case it was "borrowing" capacity from live.145 PruneLiveResourcesToPercentage(targetPercentLive);144 pruneDeadResourcesToPercentage(targetPercentLive); // Prune dead first, in case it was "borrowing" capacity from live. 145 pruneLiveResourcesToPercentage(targetPercentLive); 146 146 } 147 147 … … 194 194 void pruneDeadResources(); // Automatically decide how much to prune. 195 195 void pruneLiveResources(); 196 void PruneDeadResourcesToPercentage(float prunePercentage);197 void PruneLiveResourcesToPercentage(float prunePercentage);196 void pruneDeadResourcesToPercentage(float prunePercentage); // Prune to % current size 197 void pruneLiveResourcesToPercentage(float prunePercentage); 198 198 void pruneDeadResourcesToSize(unsigned targetSize); 199 199 void pruneLiveResourcesToSize(unsigned targetSize); -
trunk/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm
r87228 r87330 26 26 #import "config.h" 27 27 #import "MemoryPressureHandler.h" 28 28 29 #import <WebCore/GCController.h> 29 30 #import <WebCore/MemoryCache.h> … … 87 88 { 88 89 int savedPageCacheCapacity = pageCache()->capacity(); 89 pageCache()->setCapacity(pageCache()->pageCount() >>1);90 pageCache()->setCapacity(pageCache()->pageCount()/2); 90 91 pageCache()->setCapacity(savedPageCacheCapacity); 91 92 pageCache()->releaseAutoreleasedPagesNow(); … … 93 94 NSURLCache *nsurlCache = [NSURLCache sharedURLCache]; 94 95 NSUInteger savedNsurlCacheMemoryCapacity = [nsurlCache memoryCapacity]; 95 [nsurlCache setMemoryCapacity:[nsurlCache currentMemoryUsage] >>1];96 [nsurlCache setMemoryCapacity:[nsurlCache currentMemoryUsage]/2]; 96 97 [nsurlCache setMemoryCapacity:savedNsurlCacheMemoryCapacity]; 97 98
Note: See TracChangeset
for help on using the changeset viewer.