Bug 209932 - REGRESSION (r258525): Leak of NSMutableAttributedString in -[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]
Summary: REGRESSION (r258525): Leak of NSMutableAttributedString in -[WebAccessibility...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on: 209129
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-02 15:08 PDT by David Kilzer (:ddkilzer)
Modified: 2020-04-03 12:10 PDT (History)
10 users (show)

See Also:


Attachments
Patch v1 (1.85 KB, patch)
2020-04-02 15:14 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 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);
        [...]
Comment 1 Radar WebKit Bug Importer 2020-04-02 15:08:33 PDT
<rdar://problem/61228565>
Comment 2 David Kilzer (:ddkilzer) 2020-04-02 15:14:47 PDT
Created attachment 395308 [details]
Patch v1
Comment 3 Darin Adler 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.
Comment 4 EWS 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].