Changeset 258048 in webkit
- Timestamp:
- Mar 6, 2020 6:25:29 PM (4 years ago)
- Location:
- trunk/Source/WebKitLegacy/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKitLegacy/mac/ChangeLog
r258040 r258048 1 2020-03-06 Simon Fraser <simon.fraser@apple.com> 2 3 Flaky Test: editing/spelling/spellcheck-async.html 4 https://bugs.webkit.org/show_bug.cgi?id=160571 5 6 Reviewed by Tim Horton. 7 8 The old code called -performSelector:target:... with an autoreleased target, 9 and nothing keeps the target alive until the call to -perform on the main thread. 10 11 Change this to a block which copies in a RetainPtr<> to make ownership clearer 12 and fix the crash. 13 14 * WebCoreSupport/WebEditorClient.mm: 15 (WebEditorClient::requestCheckingOfString): 16 1 17 2020-03-06 Jer Noble <jer.noble@apple.com> 2 18 -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm
r256948 r258048 1259 1259 NSDictionary *options = @{ NSTextCheckingInsertionPointKey : [NSNumber numberWithUnsignedInteger:insertionPointFromCurrentSelection(currentSelection)] }; 1260 1260 [[NSSpellChecker sharedSpellChecker] requestCheckingOfString:m_textCheckingRequest->data().text() range:range types:NSTextCheckingAllSystemTypes options:options inSpellDocumentWithTag:0 completionHandler:^(NSInteger, NSArray* results, NSOrthography*, NSInteger) { 1261 [currentLoop performSelector:@selector(perform)1262 target:[[[WebEditorSpellCheckResponder alloc] initWithClient:this sequence:sequence results:results] autorelease]1263 argument:nil order:0 modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]];1261 RetainPtr<WebEditorSpellCheckResponder> responder = adoptNS([[WebEditorSpellCheckResponder alloc] initWithClient:this sequence:sequence results:results]); 1262 [currentLoop performBlock:^{ 1263 [responder perform]; 1264 1264 }]; 1265 }]; 1265 1266 #endif 1266 1267 }
Note: See TracChangeset
for help on using the changeset viewer.