Changeset 244703 in webkit
- Timestamp:
- Apr 26, 2019 11:32:46 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r244701 r244703 1 2019-04-26 David Kilzer <ddkilzer@apple.com> 2 3 WebKitTestRunner leaks an NSDictionary and multiple JSStringRef objects 4 <https://webkit.org/b/197314> 5 <rdar://problem/50245252> 6 7 Reviewed by Simon Fraser. 8 9 * WebKitTestRunner/UIScriptControllerCocoa.mm: 10 (WTR::UIScriptController::lastUndoLabel const): 11 (WTR::UIScriptController::firstRedoLabel const): 12 - Use adopt(JSStringCreateWithCFString(...)) to fix leaks. 13 14 * WebKitTestRunner/ios/HIDEventGenerator.mm: 15 (-[HIDEventGenerator sendEventStream:completionBlock:]): 16 - Call -autorelease to fix leak of NSDictionary. 17 18 * WebKitTestRunner/ios/UIScriptControllerIOS.mm: 19 (WTR::UIScriptController::accessibilitySpeakSelectionContent const): 20 (WTR::UIScriptController::selectFormPopoverTitle const): 21 (WTR::UIScriptController::textContentType const): 22 (WTR::UIScriptController::formInputLabel const): 23 (WTR::UIScriptController::scrollingTreeAsText const): 24 - Use adopt(JSStringCreateWithCFString(...)) to fix leaks. 25 1 26 2019-04-26 Jonathan Bedard <jbedard@apple.com> 2 27 -
trunk/Tools/WebKitTestRunner/UIScriptControllerCocoa.mm
r242339 r244703 152 152 JSRetainPtr<JSStringRef> UIScriptController::lastUndoLabel() const 153 153 { 154 return JSStringCreateWithCFString((__bridge CFStringRef)platformUndoManager().undoActionName);154 return adopt(JSStringCreateWithCFString((__bridge CFStringRef)platformUndoManager().undoActionName)); 155 155 } 156 156 157 157 JSRetainPtr<JSStringRef> UIScriptController::firstRedoLabel() const 158 158 { 159 return JSStringCreateWithCFString((__bridge CFStringRef)platformUndoManager().redoActionName);159 return adopt(JSStringCreateWithCFString((__bridge CFStringRef)platformUndoManager().redoActionName)); 160 160 } 161 161 -
trunk/Tools/WebKitTestRunner/ios/HIDEventGenerator.mm
r241734 r244703 1139 1139 1140 1140 NSDictionary* threadData = @{ 1141 @"eventInfo": [ eventInfo copy],1141 @"eventInfo": [[eventInfo copy] autorelease], 1142 1142 @"completionBlock": [[completionBlock copy] autorelease] 1143 1143 }; -
trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm
r244370 r244703 199 199 { 200 200 TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView(); 201 return JSStringCreateWithCFString((CFStringRef)webView.accessibilitySpeakSelectionContent);201 return adopt(JSStringCreateWithCFString((CFStringRef)webView.accessibilitySpeakSelectionContent)); 202 202 } 203 203 … … 500 500 { 501 501 TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView(); 502 return JSStringCreateWithCFString((CFStringRef)webView.selectFormPopoverTitle);502 return adopt(JSStringCreateWithCFString((CFStringRef)webView.selectFormPopoverTitle)); 503 503 } 504 504 … … 506 506 { 507 507 TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView(); 508 return JSStringCreateWithCFString((CFStringRef)(webView.textContentTypeForTesting ?: @""));508 return adopt(JSStringCreateWithCFString((CFStringRef)(webView.textContentTypeForTesting ?: @""))); 509 509 } 510 510 … … 512 512 { 513 513 TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView(); 514 return JSStringCreateWithCFString((CFStringRef)webView.formInputLabel);514 return adopt(JSStringCreateWithCFString((CFStringRef)webView.formInputLabel)); 515 515 } 516 516 … … 752 752 { 753 753 TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView(); 754 return JSStringCreateWithCFString((CFStringRef)[webView _scrollingTreeAsText]);754 return adopt(JSStringCreateWithCFString((CFStringRef)[webView _scrollingTreeAsText])); 755 755 } 756 756
Note: See TracChangeset
for help on using the changeset viewer.