| Summary: | REGRESSION (r8412): Use RetainPtr<> for NSMutableAttributedString in -[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:] | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> | ||||||
| Component: | Accessibility | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | aboxhall, apinheiro, cfleizach, darin, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=209129 https://bugs.webkit.org/show_bug.cgi?id=209932 |
||||||||
| Attachments: |
|
||||||||
Created attachment 395400 [details]
Patch v1
LOL! Commit r8412 is so old that Bugzilla refuses to link it! <https://trac.webkit.org/r8412> Comment on attachment 395400 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=395400&action=review > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1258 > + RetainPtr<NSMutableAttributedString> attrString = adoptNS([[NSMutableAttributedString alloc] init]); Could just write: auto attrString = ... Created attachment 395401 [details]
Patch for landing
Committed r259483: <https://trac.webkit.org/changeset/259483> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395401 [details]. |
Way back in 2005 in commit r8412, David Harrison added this line of code to WebCore/kwq/KWQAccObject.mm that was never changed to use RetainPtr<>: NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] init]; This lack of RetainPtr<> caused a leak when Darin landed a fix for Bug 209129. I fixed the leak in Bug 209932 by moving an early return, but Darin was curious about why this variable had never been converted: <https://bugs.webkit.org/show_bug.cgi?id=209932#c3>