Changeset 179720 in webkit
- Timestamp:
- Feb 5, 2015 3:47:35 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r179708 r179720 1 2015-02-05 Joseph Pecoraro <pecoraro@apple.com> 2 3 [iOS] Remove False Positive dispatch_source Leak in WebMemoryPressureHandler singleton 4 https://bugs.webkit.org/show_bug.cgi?id=141307 5 6 Reviewed by Anders Carlsson. 7 8 * UIProcess/ios/WebMemoryPressureHandlerIOS.h: 9 * UIProcess/ios/WebMemoryPressureHandlerIOS.mm: 10 (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler): 11 We want to keep the dispatch_source around, so just tie it to the 12 singleton so that it is not reported as a leak. 13 1 14 2015-02-05 Antti Koivisto <antti@apple.com> 2 15 -
trunk/Source/WebKit2/UIProcess/ios/WebMemoryPressureHandlerIOS.h
r179409 r179720 29 29 #if PLATFORM(IOS) 30 30 31 #include <wtf/NeverDestroyed.h> 31 #import <dispatch/dispatch.h> 32 #import <wtf/NeverDestroyed.h> 32 33 33 34 namespace WebKit { … … 40 41 private: 41 42 WebMemoryPressureHandler(); 43 dispatch_source_t _source; 42 44 }; 43 45 -
trunk/Source/WebKit2/UIProcess/ios/WebMemoryPressureHandlerIOS.mm
r179409 r179720 46 46 // and you can only have one WebCore::MemoryPressureHandler. 47 47 48 dispatch_source_tsource = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYSTATUS, 0, DISPATCH_MEMORYSTATUS_PRESSURE_WARN, dispatch_get_main_queue());49 dispatch_set_context( source, this);50 dispatch_source_set_event_handler( source, ^{48 _source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYSTATUS, 0, DISPATCH_MEMORYSTATUS_PRESSURE_WARN, dispatch_get_main_queue()); 49 dispatch_set_context(_source, this); 50 dispatch_source_set_event_handler(_source, ^{ 51 51 ViewSnapshotStore::singleton().discardSnapshotImages(); 52 52 }); 53 dispatch_resume( source);53 dispatch_resume(_source); 54 54 } 55 55
Note: See TracChangeset
for help on using the changeset viewer.