Title: [92411] tags/Safari-534.49.1/Source/WebCore
Diff
Modified: tags/Safari-534.49.1/Source/WebCore/ChangeLog (92410 => 92411)
--- tags/Safari-534.49.1/Source/WebCore/ChangeLog 2011-08-04 21:12:38 UTC (rev 92410)
+++ tags/Safari-534.49.1/Source/WebCore/ChangeLog 2011-08-04 21:13:11 UTC (rev 92411)
@@ -1,5 +1,24 @@
2011-08-04 Lucas Forschler <[email protected]>
+ Merged 89214.
+
+ 2011-06-19 Michael Saboff <[email protected]>
+
+ Reviewed by Darin Adler.
+
+ Add notify handler to trigger MemoryPressureHandler in all builds
+ https://bugs.webkit.org/show_bug.cgi?id=62679
+
+ Removed SIGUSR2 trigger and added a notify trigger for the
+ MemoryPressureHandler. The notify trigger is enabled for all builds.
+
+ No test added as only added new memory pressure trigger.
+
+ * platform/mac/MemoryPressureHandlerMac.mm:
+ (WebCore::MemoryPressureHandler::install):
+
+2011-08-04 Lucas Forschler <[email protected]>
+
Merged 92231.
2011-08-01 Michael Saboff <[email protected]>
Modified: tags/Safari-534.49.1/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm (92410 => 92411)
--- tags/Safari-534.49.1/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm 2011-08-04 21:12:38 UTC (rev 92410)
+++ tags/Safari-534.49.1/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm 2011-08-04 21:13:11 UTC (rev 92411)
@@ -34,6 +34,7 @@
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
#import <dispatch/dispatch.h>
+#import <notify.h>
#ifndef DISPATCH_SOURCE_TYPE_VM
#define DISPATCH_SOURCE_TYPE_VM (&_dispatch_source_type_vm)
@@ -53,12 +54,11 @@
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
static dispatch_source_t _cache_event_source = 0;
-#ifndef NDEBUG
-static dispatch_source_t _cache_event_source2 = 0;
-#endif
void MemoryPressureHandler::install()
{
+ static int notifyToken;
+
if (m_installed)
return;
@@ -71,17 +71,8 @@
}
});
-#ifndef NDEBUG
- dispatch_async(dispatch_get_main_queue(), ^{
- _cache_event_source2 = dispatch_source_create(DISPATCH_SOURCE_TYPE_SIGNAL, SIGUSR2, 0, dispatch_get_main_queue());
- if (_cache_event_source2) {
- dispatch_set_context(_cache_event_source2, this);
- dispatch_source_set_event_handler(_cache_event_source2, ^{ memoryPressureHandler().respondToMemoryPressure();});
- dispatch_resume(_cache_event_source2);
- signal((int)SIGUSR2, SIG_IGN);
- }
- });
-#endif
+ notify_register_dispatch("org.WebKit.lowMemory", ¬ifyToken,
+ dispatch_get_main_queue(), ^(int) { memoryPressureHandler().respondToMemoryPressure();});
m_installed = true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes