Bug 209932

Summary: REGRESSION (r258525): Leak of NSMutableAttributedString in -[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: AccessibilityAssignee: 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=209980
Bug Depends on: 209129    
Bug Blocks:    
Attachments:
Description Flags
Patch v1 none

David Kilzer (:ddkilzer)
Reported 2020-04-02 15:08:26 PDT
Leak of NSMutableAttributedString in -[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]. [...] RefPtr<Range> range = [protectedSelf rangeForTextMarkerRange:textMarkerRange]; NSMutableAttributedString* attrString = [[NSMutableAttributedString alloc] init]; if (!range) return nil; // LEAK. TextIterator it(*range); [...]
Attachments
Patch v1 (1.85 KB, patch)
2020-04-02 15:14 PDT, David Kilzer (:ddkilzer)
no flags
Radar WebKit Bug Importer
Comment 1 2020-04-02 15:08:33 PDT
David Kilzer (:ddkilzer)
Comment 2 2020-04-02 15:14:47 PDT
Created attachment 395308 [details] Patch v1
Darin Adler
Comment 3 2020-04-02 16:06:15 PDT
Comment on attachment 395308 [details] Patch v1 Thanks for catching that Dave. Strange that we were not using a RetainPtr.
EWS
Comment 4 2020-04-02 16:53:00 PDT
Committed r259428: <https://trac.webkit.org/changeset/259428> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395308 [details].
Note You need to log in before you can comment on or make changes to this bug.