Source/WebCore: Cleanup refactoring for https://bugs.webkit.org/show_bug.cgi?id=67160
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Sep 2011 00:20:30 +0000 (00:20 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Sep 2011 00:20:30 +0000 (00:20 +0000)
Don't ifdef out the data member xslStyleSheets in MemoryCache::Statistics to cut down
the ifdefs in getWebCoreMemoryCacheStatistics() in WebKit2/WebProcess/WebProcess.cpp.

Reviewed by Darin Adler.

No new tests required.  Just small code refactoring.

* loader/cache/MemoryCache.h:

Source/WebKit2: Cut down the ifdefs in WebKit::getWebCoreMemoryCacheStatistics() now that
MemoryCache::Statistics always has the xslStyleSheets field.

Reviewed by Darin Adler.

* WebProcess/WebProcess.cpp:
(WebKit::getWebCoreMemoryCacheStatistics):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94371 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/cache/MemoryCache.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebProcess.cpp

index 3eaa411..61aab2f 100644 (file)
@@ -1,3 +1,16 @@
+2011-09-01  Ada Chan  <adachan@apple.com>
+
+        Cleanup refactoring for https://bugs.webkit.org/show_bug.cgi?id=67160
+
+        Don't ifdef out the data member xslStyleSheets in MemoryCache::Statistics to cut down 
+        the ifdefs in getWebCoreMemoryCacheStatistics() in WebKit2/WebProcess/WebProcess.cpp.
+
+        Reviewed by Darin Adler.
+
+        No new tests required.  Just small code refactoring.
+
+        * loader/cache/MemoryCache.h:
+
 2011-09-01  Julien Chaffraix  <jchaffraix@webkit.org>
 
         REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page
index 1a24c82..a937d96 100644 (file)
@@ -99,9 +99,7 @@ public:
         TypeStatistic images;
         TypeStatistic cssStyleSheets;
         TypeStatistic scripts;
-#if ENABLE(XSLT)
         TypeStatistic xslStyleSheets;
-#endif
         TypeStatistic fonts;
     };
     
index 8a9163c..98cdf8e 100644 (file)
@@ -1,3 +1,13 @@
+2011-09-01  Ada Chan  <adachan@apple.com>
+
+        Cut down the ifdefs in WebKit::getWebCoreMemoryCacheStatistics() now that 
+        MemoryCache::Statistics always has the xslStyleSheets field.
+
+        Reviewed by Darin Adler.
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::getWebCoreMemoryCacheStatistics):
+
 2011-09-01  Mark Hahnenberg  <mhahnenberg@apple.com>
 
         Unzip initialization lists and constructors in JSCell hierarchy (4/7)
index 431ea9e..ce997e8 100644 (file)
@@ -845,66 +845,42 @@ static void getWebCoreMemoryCacheStatistics(Vector<HashMap<String, uint64_t> >&
     HashMap<String, uint64_t> counts;
     counts.set(imagesString, memoryCacheStatistics.images.count);
     counts.set(cssString, memoryCacheStatistics.cssStyleSheets.count);
-#if ENABLE(XSLT)
     counts.set(xslString, memoryCacheStatistics.xslStyleSheets.count);
-#else
-    counts.set(xslString, 0);
-#endif
     counts.set(javaScriptString, memoryCacheStatistics.scripts.count);
     result.append(counts);
     
     HashMap<String, uint64_t> sizes;
     sizes.set(imagesString, memoryCacheStatistics.images.size);
     sizes.set(cssString, memoryCacheStatistics.cssStyleSheets.size);
-#if ENABLE(XSLT)
     sizes.set(xslString, memoryCacheStatistics.xslStyleSheets.size);
-#else
-    sizes.set(xslString, 0);
-#endif
     sizes.set(javaScriptString, memoryCacheStatistics.scripts.size);
     result.append(sizes);
     
     HashMap<String, uint64_t> liveSizes;
     liveSizes.set(imagesString, memoryCacheStatistics.images.liveSize);
     liveSizes.set(cssString, memoryCacheStatistics.cssStyleSheets.liveSize);
-#if ENABLE(XSLT)
     liveSizes.set(xslString, memoryCacheStatistics.xslStyleSheets.liveSize);
-#else
-    liveSizes.set(xslString, 0);
-#endif
     liveSizes.set(javaScriptString, memoryCacheStatistics.scripts.liveSize);
     result.append(liveSizes);
     
     HashMap<String, uint64_t> decodedSizes;
     decodedSizes.set(imagesString, memoryCacheStatistics.images.decodedSize);
     decodedSizes.set(cssString, memoryCacheStatistics.cssStyleSheets.decodedSize);
-#if ENABLE(XSLT)
     decodedSizes.set(xslString, memoryCacheStatistics.xslStyleSheets.decodedSize);
-#else
-    decodedSizes.set(xslString, 0);
-#endif
     decodedSizes.set(javaScriptString, memoryCacheStatistics.scripts.decodedSize);
     result.append(decodedSizes);
     
     HashMap<String, uint64_t> purgeableSizes;
     purgeableSizes.set(imagesString, memoryCacheStatistics.images.purgeableSize);
     purgeableSizes.set(cssString, memoryCacheStatistics.cssStyleSheets.purgeableSize);
-#if ENABLE(XSLT)
     purgeableSizes.set(xslString, memoryCacheStatistics.xslStyleSheets.purgeableSize);
-#else
-    purgeableSizes.set(xslString, 0);
-#endif
     purgeableSizes.set(javaScriptString, memoryCacheStatistics.scripts.purgeableSize);
     result.append(purgeableSizes);
     
     HashMap<String, uint64_t> purgedSizes;
     purgedSizes.set(imagesString, memoryCacheStatistics.images.purgedSize);
     purgedSizes.set(cssString, memoryCacheStatistics.cssStyleSheets.purgedSize);
-#if ENABLE(XSLT)
     purgedSizes.set(xslString, memoryCacheStatistics.xslStyleSheets.purgedSize);
-#else
-    purgedSizes.set(xslString, 0);
-#endif
     purgedSizes.set(javaScriptString, memoryCacheStatistics.scripts.purgedSize);
     result.append(purgedSizes);
 }