Title: [115535] trunk/Source
Revision
115535
Author
[email protected]
Date
2012-04-27 20:56:53 -0700 (Fri, 27 Apr 2012)

Log Message

[Chromium] Call highMemoryUsageMB directly
https://bugs.webkit.org/show_bug.cgi?id=84841

Reviewed by Kentaro Hara.

Part of a refactoring series. See tracking bug 82948.

Source/WebCore:

* bindings/v8/V8GCController.cpp:
(WebCore::V8GCController::checkMemoryUsage):
* platform/MemoryUsageSupport.cpp:
(WebCore::MemoryUsageSupport::highMemoryUsageMB):
(WebCore):
* platform/MemoryUsageSupport.h:
(MemoryUsageSupport):
* platform/chromium/MemoryUsageSupportChromium.cpp:
(WebCore::MemoryUsageSupport::highMemoryUsageMB):
(WebCore):
* platform/chromium/PlatformSupport.h:
(PlatformSupport):

Source/WebKit/chromium:

* src/PlatformSupport.cpp:
(WebCore):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (115534 => 115535)


--- trunk/Source/WebCore/ChangeLog	2012-04-28 03:43:29 UTC (rev 115534)
+++ trunk/Source/WebCore/ChangeLog	2012-04-28 03:56:53 UTC (rev 115535)
@@ -1,3 +1,25 @@
+2012-04-27  Mark Pilgrim  <[email protected]>
+
+        [Chromium] Call highMemoryUsageMB directly
+        https://bugs.webkit.org/show_bug.cgi?id=84841
+
+        Reviewed by Kentaro Hara.
+
+        Part of a refactoring series. See tracking bug 82948.
+
+        * bindings/v8/V8GCController.cpp:
+        (WebCore::V8GCController::checkMemoryUsage):
+        * platform/MemoryUsageSupport.cpp:
+        (WebCore::MemoryUsageSupport::highMemoryUsageMB):
+        (WebCore):
+        * platform/MemoryUsageSupport.h:
+        (MemoryUsageSupport):
+        * platform/chromium/MemoryUsageSupportChromium.cpp:
+        (WebCore::MemoryUsageSupport::highMemoryUsageMB):
+        (WebCore):
+        * platform/chromium/PlatformSupport.h:
+        (PlatformSupport):
+
 2012-04-27  Geoffrey Garen  <[email protected]>
 
         Only allow non-null pointers in the WeakSet

Modified: trunk/Source/WebCore/bindings/v8/V8GCController.cpp (115534 => 115535)


--- trunk/Source/WebCore/bindings/v8/V8GCController.cpp	2012-04-28 03:43:29 UTC (rev 115534)
+++ trunk/Source/WebCore/bindings/v8/V8GCController.cpp	2012-04-28 03:56:53 UTC (rev 115535)
@@ -515,7 +515,7 @@
 {
 #if PLATFORM(CHROMIUM) || PLATFORM(QT)
     const int lowMemoryUsageMB = MemoryUsageSupport::lowMemoryUsageMB();
-    const int highMemoryUsageMB = PlatformSupport::highMemoryUsageMB();
+    const int highMemoryUsageMB = MemoryUsageSupport::highMemoryUsageMB();
     const int highUsageDeltaMB = PlatformSupport::highUsageDeltaMB();
     int memoryUsageMB = getMemoryUsageInMB();
     if ((memoryUsageMB > lowMemoryUsageMB && memoryUsageMB > 2 * workingSetEstimateMB) || (memoryUsageMB > highMemoryUsageMB && memoryUsageMB > workingSetEstimateMB + highUsageDeltaMB))

Modified: trunk/Source/WebCore/platform/MemoryUsageSupport.cpp (115534 => 115535)


--- trunk/Source/WebCore/platform/MemoryUsageSupport.cpp	2012-04-28 03:43:29 UTC (rev 115534)
+++ trunk/Source/WebCore/platform/MemoryUsageSupport.cpp	2012-04-28 03:56:53 UTC (rev 115535)
@@ -48,4 +48,9 @@
     return 0;
 }
 
+int MemoryUsageSupport::highMemoryUsageMB()
+{
+    return 0;
+}
+    
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/MemoryUsageSupport.h (115534 => 115535)


--- trunk/Source/WebCore/platform/MemoryUsageSupport.h	2012-04-28 03:43:29 UTC (rev 115534)
+++ trunk/Source/WebCore/platform/MemoryUsageSupport.h	2012-04-28 03:56:53 UTC (rev 115535)
@@ -45,6 +45,9 @@
 
     // If memory usage is below this threshold, do not bother forcing GC.
     static int lowMemoryUsageMB();
+
+    // If memory usage is above this threshold, force GC more aggressively.
+    static int highMemoryUsageMB();
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp (115534 => 115535)


--- trunk/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp	2012-04-28 03:43:29 UTC (rev 115534)
+++ trunk/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp	2012-04-28 03:56:53 UTC (rev 115535)
@@ -50,4 +50,9 @@
     return WebKit::Platform::current()->lowMemoryUsageMB();
 }
 
+int MemoryUsageSupport::highMemoryUsageMB()
+{
+    return WebKit::Platform::current()->highMemoryUsageMB();
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/chromium/PlatformSupport.h (115534 => 115535)


--- trunk/Source/WebCore/platform/chromium/PlatformSupport.h	2012-04-28 03:43:29 UTC (rev 115534)
+++ trunk/Source/WebCore/platform/chromium/PlatformSupport.h	2012-04-28 03:56:53 UTC (rev 115535)
@@ -195,8 +195,6 @@
     static bool layoutTestMode();
 
     // Memory -------------------------------------------------------------
-    // If memory usage is above this threshold, force GC more aggressively.
-    static int highMemoryUsageMB();
     // Delta of memory usage growth (vs. last actualMemoryUsageMB()) to force GC when memory usage is high.
     static int highUsageDeltaMB();
 

Modified: trunk/Source/WebKit/chromium/ChangeLog (115534 => 115535)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-28 03:43:29 UTC (rev 115534)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-28 03:56:53 UTC (rev 115535)
@@ -1,3 +1,15 @@
+2012-04-27  Mark Pilgrim  <[email protected]>
+
+        [Chromium] Call highMemoryUsageMB directly
+        https://bugs.webkit.org/show_bug.cgi?id=84841
+
+        Reviewed by Kentaro Hara.
+
+        Part of a refactoring series. See tracking bug 82948.
+
+        * src/PlatformSupport.cpp:
+        (WebCore):
+
 2012-04-27  Adrienne Walker  <[email protected]>
 
         [chromium] Allow WebMediaPlayerClientImpl to switch clients

Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (115534 => 115535)


--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp	2012-04-28 03:43:29 UTC (rev 115534)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp	2012-04-28 03:56:53 UTC (rev 115535)
@@ -914,11 +914,6 @@
     webFrame->client()->didExhaustMemoryAvailableForScript(webFrame);
 }
 
-int PlatformSupport::highMemoryUsageMB()
-{
-    return static_cast<int>(webKitPlatformSupport()->highMemoryUsageMB());
-}
-
 int PlatformSupport::highUsageDeltaMB()
 {
     return static_cast<int>(webKitPlatformSupport()->highUsageDeltaMB());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to