Changeset 218704 in webkit
- Timestamp:
- Jun 22, 2017 10:07:52 AM (7 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r218691 r218704 1 2017-06-22 David Kilzer <ddkilzer@apple.com> 2 3 v2: REGRESSION (r218419): 3 NSMutableDictionary leaks calling -[WKProcessPool _pluginLoadClientPolicies] 4 <https://webkit.org/b/173689> 5 6 Reviewed by Chris Dumez. 7 8 * UIProcess/API/Cocoa/WKProcessPool.mm: 9 (policiesHashMapToDictionary): Use -dictionaryWithCapacity: 10 instead of -new since the former returns an autoreleased object 11 while the latter does not. This has the added benefit of tuning 12 the size of each NSMutableDictionary. 13 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: 14 (-[WKProcessPool _pluginLoadClientPolicies]): Remove 'copy' 15 attribute from @property declaration since it is read-only. 16 1 17 2017-06-22 Carlos Garcia Campos <cgarcia@igalia.com> 2 18 … … 78 94 2017-06-21 David Kilzer <ddkilzer@apple.com> 79 95 80 REGRESSION (r218419): 3 NSMutableDic iontary leaks calling -[WKProcessPool _pluginLoadClientPolicies]96 REGRESSION (r218419): 3 NSMutableDictionary leaks calling -[WKProcessPool _pluginLoadClientPolicies] 81 97 <https://webkit.org/b/173689> 82 98 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm
r218678 r218704 314 314 static NSDictionary *policiesHashMapToDictionary(const HashMap<String, HashMap<String, HashMap<String, uint8_t>>>& map) 315 315 { 316 NSMutableDictionary *policies = [NSMutableDictionary new];316 NSMutableDictionary *policies = [NSMutableDictionary dictionaryWithCapacity:map.size()]; 317 317 for (auto& hostPair : map) { 318 318 NSString *host = hostPair.key; 319 policies[host] = [NSMutableDictionary new];319 policies[host] = [NSMutableDictionary dictionaryWithCapacity:hostPair.value.size()]; 320 320 for (auto& bundleIdentifierPair : hostPair.value) { 321 321 NSString *bundlerIdentifier = bundleIdentifierPair.key; 322 policies[host][bundlerIdentifier] = [NSMutableDictionary new];322 policies[host][bundlerIdentifier] = [NSMutableDictionary dictionaryWithCapacity:bundleIdentifierPair.value.size()]; 323 323 for (auto& versionPair : bundleIdentifierPair.value) { 324 324 NSString *version = versionPair.key; -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h
r218444 r218704 55 55 #if !TARGET_OS_IPHONE 56 56 - (void)_resetPluginLoadClientPolicies:(NSDictionary *)policies WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 57 @property (nonatomic, readonly , copy) NSDictionary *_pluginLoadClientPolicies WK_API_AVAILABLE(macosx(WK_MAC_TBA));57 @property (nonatomic, readonly) NSDictionary *_pluginLoadClientPolicies WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 58 58 #endif 59 59
Note: See TracChangeset
for help on using the changeset viewer.