Title: [214370] trunk/Source/WTF
Revision
214370
Author
ryanhad...@apple.com
Date
2017-03-24 13:45:04 -0700 (Fri, 24 Mar 2017)

Log Message

Unreviewed, rolling out r214351.

This change caused API test
WebKit1.DidCreateJavaScriptContextBackForwardCacheTest to
fail.

Reverted changeset:

"Make inactive web processes behave as though under memory
pressure."
https://bugs.webkit.org/show_bug.cgi?id=170042
http://trac.webkit.org/changeset/214351

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (214369 => 214370)


--- trunk/Source/WTF/ChangeLog	2017-03-24 20:39:22 UTC (rev 214369)
+++ trunk/Source/WTF/ChangeLog	2017-03-24 20:45:04 UTC (rev 214370)
@@ -1,3 +1,18 @@
+2017-03-24  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r214351.
+
+        This change caused API test
+        WebKit1.DidCreateJavaScriptContextBackForwardCacheTest to
+        fail.
+
+        Reverted changeset:
+
+        "Make inactive web processes behave as though under memory
+        pressure."
+        https://bugs.webkit.org/show_bug.cgi?id=170042
+        http://trac.webkit.org/changeset/214351
+
 2017-03-24  Chris Dumez  <cdu...@apple.com>
 
         Unreviewed, rolling out r214329.

Modified: trunk/Source/WTF/wtf/MemoryPressureHandler.cpp (214369 => 214370)


--- trunk/Source/WTF/wtf/MemoryPressureHandler.cpp	2017-03-24 20:39:22 UTC (rev 214369)
+++ trunk/Source/WTF/wtf/MemoryPressureHandler.cpp	2017-03-24 20:45:04 UTC (rev 214370)
@@ -171,9 +171,6 @@
     if (m_processState == state)
         return;
     m_processState = state;
-    memoryPressureStatusChanged();
-    if (m_processState == WebsamProcessState::Inactive)
-        respondToMemoryPressure(Critical::Yes, Synchronous::No);
 }
 
 void MemoryPressureHandler::beginSimulatedMemoryPressure()
@@ -193,17 +190,6 @@
     memoryPressureStatusChanged();
 }
 
-bool MemoryPressureHandler::isUnderMemoryPressure()
-{
-    auto& memoryPressureHandler = singleton();
-    return memoryPressureHandler.m_underMemoryPressure
-#if PLATFORM(MAC)
-        || memoryPressureHandler.m_memoryUsagePolicy >= MemoryUsagePolicy::Strict
-        || memoryPressureHandler.m_processState == WebsamProcessState::Inactive
-#endif
-        || memoryPressureHandler.m_isSimulatingMemoryPressure;
-}
-
 void MemoryPressureHandler::releaseMemory(Critical critical, Synchronous synchronous)
 {
     if (!m_lowMemoryHandler)

Modified: trunk/Source/WTF/wtf/MemoryPressureHandler.h (214369 => 214370)


--- trunk/Source/WTF/wtf/MemoryPressureHandler.h	2017-03-24 20:39:22 UTC (rev 214369)
+++ trunk/Source/WTF/wtf/MemoryPressureHandler.h	2017-03-24 20:45:04 UTC (rev 214370)
@@ -79,7 +79,14 @@
         m_lowMemoryHandler = WTFMove(handler);
     }
 
-    WTF_EXPORT_PRIVATE static bool isUnderMemoryPressure();
+    bool isUnderMemoryPressure() const
+    {
+        return m_underMemoryPressure
+#if PLATFORM(MAC)
+            || m_memoryUsagePolicy >= MemoryUsagePolicy::Strict
+#endif
+            || m_isSimulatingMemoryPressure;
+    }
     void setUnderMemoryPressure(bool);
 
 #if OS(LINUX)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to