Changeset 218678 in webkit
- Timestamp:
- Jun 21, 2017, 9:46:42 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r218676 r218678 1 2017-06-21 David Kilzer <ddkilzer@apple.com> 2 3 REGRESSION (r218419): 3 NSMutableDiciontary leaks calling -[WKProcessPool _pluginLoadClientPolicies] 4 <https://webkit.org/b/173689> 5 6 Reviewed by Chris Dumez. 7 8 Caught by the clang static analyzer. 9 10 * UIProcess/API/Cocoa/WKProcessPool.mm: 11 (policiesHashMapToDictionary): Switch from using 12 [[NSMutableDictionary alloc] init] which returns a +1 retained 13 object in MRR to [NSMutableDictionary new] which returns an 14 autoreleased object under MRR. This bug caused 3 leaks when 15 calling -[WKProcessPool _pluginLoadClientPolicies], which should 16 return an autoreleased object based on its signature. 17 1 18 2017-06-21 Ryosuke Niwa <rniwa@webkit.org> 2 19 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm
r218419 r218678 314 314 static NSDictionary *policiesHashMapToDictionary(const HashMap<String, HashMap<String, HashMap<String, uint8_t>>>& map) 315 315 { 316 NSMutableDictionary *policies = [ [NSMutableDictionary alloc] init];316 NSMutableDictionary *policies = [NSMutableDictionary new]; 317 317 for (auto& hostPair : map) { 318 318 NSString *host = hostPair.key; 319 policies[host] = [ [NSMutableDictionary alloc] init];319 policies[host] = [NSMutableDictionary new]; 320 320 for (auto& bundleIdentifierPair : hostPair.value) { 321 321 NSString *bundlerIdentifier = bundleIdentifierPair.key; 322 policies[host][bundlerIdentifier] = [ [NSMutableDictionary alloc] init];322 policies[host][bundlerIdentifier] = [NSMutableDictionary new]; 323 323 for (auto& versionPair : bundleIdentifierPair.value) { 324 324 NSString *version = versionPair.key;
Note:
See TracChangeset
for help on using the changeset viewer.