Title: [167722] trunk/Source/WebCore
- Revision
- 167722
- Author
- akl...@apple.com
- Date
- 2014-04-23 14:22:53 -0700 (Wed, 23 Apr 2014)
Log Message
[iOS] Memory pressure notification should fire on main thread.
<https://webkit.org/b/132074>
Rejig the memory pressure notification to fire on the main queue
directly instead of rerouting it manually.
Reviewed by Mark Rowe.
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::install):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (167721 => 167722)
--- trunk/Source/WebCore/ChangeLog 2014-04-23 20:54:12 UTC (rev 167721)
+++ trunk/Source/WebCore/ChangeLog 2014-04-23 21:22:53 UTC (rev 167722)
@@ -1,3 +1,16 @@
+2014-04-23 Andreas Kling <akl...@apple.com>
+
+ [iOS] Memory pressure notification should fire on main thread.
+ <https://webkit.org/b/132074>
+
+ Rejig the memory pressure notification to fire on the main queue
+ directly instead of rerouting it manually.
+
+ Reviewed by Mark Rowe.
+
+ * platform/cocoa/MemoryPressureHandlerCocoa.mm:
+ (WebCore::MemoryPressureHandler::install):
+
2014-04-23 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r167720.
Modified: trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm (167721 => 167722)
--- trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm 2014-04-23 20:54:12 UTC (rev 167721)
+++ trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm 2014-04-23 21:22:53 UTC (rev 167722)
@@ -81,7 +81,7 @@
dispatch_async(dispatch_get_main_queue(), ^{
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000
- _cache_event_source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYSTATUS, 0, DISPATCH_MEMORYSTATUS_PRESSURE_WARN, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0));
+ _cache_event_source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYSTATUS, 0, DISPATCH_MEMORYSTATUS_PRESSURE_WARN, dispatch_get_main_queue());
#elif PLATFORM(MAC) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
_cache_event_source = wkCreateMemoryStatusPressureCriticalDispatchOnMainQueue();
#else
@@ -90,9 +90,7 @@
if (_cache_event_source) {
dispatch_set_context(_cache_event_source, this);
dispatch_source_set_event_handler(_cache_event_source, ^{
- dispatch_async(dispatch_get_main_queue(), ^{
- memoryPressureHandler().respondToMemoryPressure();
- });
+ memoryPressureHandler().respondToMemoryPressure();
});
dispatch_resume(_cache_event_source);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes