Title: [169237] trunk/Source
Revision
169237
Author
[email protected]
Date
2014-05-22 18:36:10 -0700 (Thu, 22 May 2014)

Log Message

[iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
<https://webkit.org/b/133197>
<rdar://problem/17011561>

Source/WebCore:
Make releaseMemory() public so we can call it from the process-will-suspend callback.

Reviewed by Gavin Barraclough.

* WebCore.exp.in:
* platform/MemoryPressureHandler.h:

Source/WebKit2:
Try to free up as much memory as possible before going into background.

Reviewed by Gavin Barraclough.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (169236 => 169237)


--- trunk/Source/WebCore/ChangeLog	2014-05-23 01:34:26 UTC (rev 169236)
+++ trunk/Source/WebCore/ChangeLog	2014-05-23 01:36:10 UTC (rev 169237)
@@ -1,5 +1,18 @@
 2014-05-22  Andreas Kling  <[email protected]>
 
+        [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
+        <https://webkit.org/b/133197>
+        <rdar://problem/17011561>
+
+        Make releaseMemory() public so we can call it from the process-will-suspend callback.
+
+        Reviewed by Gavin Barraclough.
+
+        * WebCore.exp.in:
+        * platform/MemoryPressureHandler.h:
+
+2014-05-22  Andreas Kling  <[email protected]>
+
         Hook up a setting for showing detailed logging during memory pressure relief.
         <https://webkit.org/b/133194>
 

Modified: trunk/Source/WebCore/WebCore.exp.in (169236 => 169237)


--- trunk/Source/WebCore/WebCore.exp.in	2014-05-23 01:34:26 UTC (rev 169236)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-05-23 01:36:10 UTC (rev 169237)
@@ -876,6 +876,7 @@
 __ZN7WebCore21CrossThreadCopierBaseILb0ELb0EN3WTF6StringEE4copyERKS2_
 __ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_19IDBDatabaseMetadataEE4copyERKS1_
 __ZN7WebCore21MemoryPressureHandler12ReliefLogger16s_loggingEnabledE
+__ZN7WebCore21MemoryPressureHandler13releaseMemoryEb
 __ZN7WebCore21MemoryPressureHandler7installEv
 __ZN7WebCore21NetworkStorageSession21defaultStorageSessionEv
 __ZN7WebCore21NetworkStorageSession25switchToNewTestingSessionEv

Modified: trunk/Source/WebCore/platform/MemoryPressureHandler.h (169236 => 169237)


--- trunk/Source/WebCore/platform/MemoryPressureHandler.h	2014-05-23 01:34:26 UTC (rev 169236)
+++ trunk/Source/WebCore/platform/MemoryPressureHandler.h	2014-05-23 01:36:10 UTC (rev 169237)
@@ -97,6 +97,8 @@
         static bool s_loggingEnabled;
     };
 
+    static void releaseMemory(bool critical);
+
 private:
     void uninstall();
 
@@ -106,7 +108,6 @@
     ~MemoryPressureHandler();
 
     void respondToMemoryPressure();
-    static void releaseMemory(bool critical);
     static void platformReleaseMemory(bool critical);
 
     bool m_installed;

Modified: trunk/Source/WebKit2/ChangeLog (169236 => 169237)


--- trunk/Source/WebKit2/ChangeLog	2014-05-23 01:34:26 UTC (rev 169236)
+++ trunk/Source/WebKit2/ChangeLog	2014-05-23 01:36:10 UTC (rev 169237)
@@ -1,5 +1,18 @@
 2014-05-22  Andreas Kling  <[email protected]>
 
+        [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
+        <https://webkit.org/b/133197>
+        <rdar://problem/17011561>
+
+        Try to free up as much memory as possible before going into background.
+
+        Reviewed by Gavin Barraclough.
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::processWillSuspend):
+
+2014-05-22  Andreas Kling  <[email protected]>
+
         Hook up a setting for showing detailed logging during memory pressure relief.
         <https://webkit.org/b/133194>
 

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (169236 => 169237)


--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2014-05-23 01:34:26 UTC (rev 169236)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2014-05-23 01:36:10 UTC (rev 169237)
@@ -1168,6 +1168,7 @@
     
 void WebProcess::processWillSuspend()
 {
+    memoryPressureHandler().releaseMemory(true);
     parentProcessConnection()->send(Messages::WebProcessProxy::ProcessReadyToSuspend(), 0);
 }
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to