Title: [275909] trunk/Source/WTF
Revision
275909
Author
[email protected]
Date
2021-04-13 13:55:15 -0700 (Tue, 13 Apr 2021)

Log Message

Make MemoryPressureHandler::isUnderMemoryPressure() return true for 2 seconds after a simulated warning
https://bugs.webkit.org/show_bug.cgi?id=224505

Reviewed by Darin Adler.

Make MemoryPressureHandler::isUnderMemoryPressure() return true for 2 seconds after a simulated warning,
to make our simulated warning more realistic.

* wtf/cocoa/MemoryPressureHandlerCocoa.mm:
(WTF::MemoryPressureHandler::install):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (275908 => 275909)


--- trunk/Source/WTF/ChangeLog	2021-04-13 20:52:00 UTC (rev 275908)
+++ trunk/Source/WTF/ChangeLog	2021-04-13 20:55:15 UTC (rev 275909)
@@ -1,3 +1,16 @@
+2021-04-13  Chris Dumez  <[email protected]>
+
+        Make MemoryPressureHandler::isUnderMemoryPressure() return true for 2 seconds after a simulated warning
+        https://bugs.webkit.org/show_bug.cgi?id=224505
+
+        Reviewed by Darin Adler.
+
+        Make MemoryPressureHandler::isUnderMemoryPressure() return true for 2 seconds after a simulated warning,
+        to make our simulated warning more realistic.
+
+        * wtf/cocoa/MemoryPressureHandlerCocoa.mm:
+        (WTF::MemoryPressureHandler::install):
+
 2021-04-13  Yusuke Suzuki  <[email protected]>
 
         [WTF] Add Vector&& move constructor / assignment to FixedVector and RefCountedArray

Modified: trunk/Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm (275908 => 275909)


--- trunk/Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm	2021-04-13 20:52:00 UTC (rev 275908)
+++ trunk/Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm	2021-04-13 20:55:15 UTC (rev 275909)
@@ -124,7 +124,7 @@
         logFootprintComparison(footprintBefore, footprintAfter);
 #endif
 
-        dispatch_async(m_dispatchQueue.get(), ^{
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2 * NSEC_PER_SEC), m_dispatchQueue.get(), ^{
             endSimulatedMemoryPressure();
         });
     });
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to