Skip to content

Commit dbe8479

Browse files
committed
Use adoptCF and RetainPtr in AXTextMarkerRange::AXTextMarkerRange
https://bugs.webkit.org/show_bug.cgi?id=290248 Reviewed by Geoffrey Garen. Use adoptCf and RetainPtr instead of manually calling CFRelease. * Source/WebCore/accessibility/cocoa/AXTextMarkerCocoa.mm: (WebCore::AXTextMarkerRange::AXTextMarkerRange): Canonical link: https://commits.webkit.org/292540@main
1 parent 63678cd commit dbe8479

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

Source/WebCore/accessibility/cocoa/AXTextMarkerCocoa.mm

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,11 @@
131131
return;
132132
}
133133

134-
auto start = AXTextMarkerRangeCopyStartMarker(textMarkerRangeRef);
135-
auto end = AXTextMarkerRangeCopyEndMarker(textMarkerRangeRef);
134+
RetainPtr start = adoptCF(AXTextMarkerRangeCopyStartMarker(textMarkerRangeRef));
135+
RetainPtr end = adoptCF(AXTextMarkerRangeCopyEndMarker(textMarkerRangeRef));
136136

137-
m_start = start;
138-
m_end = end;
139-
140-
CFRelease(start);
141-
CFRelease(end);
137+
m_start = start.get();
138+
m_end = end.get();
142139
}
143140

144141
RetainPtr<AXTextMarkerRangeRef> AXTextMarkerRange::platformData() const

0 commit comments

Comments
 (0)