Title: [264461] trunk/Source/WebCore
Revision
264461
Author
[email protected]
Date
2020-07-16 09:28:49 -0700 (Thu, 16 Jul 2020)

Log Message

[webAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange]needs to autorelease the return value from the main thread.
https://bugs.webkit.org/show_bug.cgi?id=214404
<rdar://problem/65627156>

Reviewed by Chris Fleizach.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
Call retrieveAutoreleasedValueFromMainthread instead of retrieveValueFromMainThread.
The autorelease call inside the lambda doesn't do the job.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (264460 => 264461)


--- trunk/Source/WebCore/ChangeLog	2020-07-16 16:28:27 UTC (rev 264460)
+++ trunk/Source/WebCore/ChangeLog	2020-07-16 16:28:49 UTC (rev 264461)
@@ -1,3 +1,16 @@
+2020-07-16  Andres Gonzalez  <[email protected]>
+
+        [webAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange]needs to autorelease the return value from the main thread.
+        https://bugs.webkit.org/show_bug.cgi?id=214404
+        <rdar://problem/65627156>
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
+        Call retrieveAutoreleasedValueFromMainthread instead of retrieveValueFromMainThread.
+        The autorelease call inside the lambda doesn't do the job.
+
 2020-07-16  Carlos Garcia Campos  <[email protected]>
 
         REGRESSION(r264280) [GTK][WPE] fast/gradients/conic-gradient-alpha.html is failing

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (264460 => 264461)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2020-07-16 16:28:27 UTC (rev 264460)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2020-07-16 16:28:49 UTC (rev 264461)
@@ -1238,9 +1238,9 @@
     return [NSString stringWithCharacters:&attachmentChar length:1];
 }
 
-- (NSAttributedString*)doAXAttributedStringForTextMarkerRange:(id)textMarkerRange spellCheck:(BOOL)spellCheck
+- (NSAttributedString *)doAXAttributedStringForTextMarkerRange:(id)textMarkerRange spellCheck:(BOOL)spellCheck
 {
-    return Accessibility::retrieveValueFromMainThread<NSAttributedString *>([&textMarkerRange, &spellCheck, protectedSelf = retainPtr(self)] () -> NSAttributedString * {
+    return Accessibility::retrieveAutoreleasedValueFromMainThread<NSAttributedString *>([&textMarkerRange, &spellCheck, protectedSelf = retainPtr(self)] () -> RetainPtr<NSAttributedString> {
         auto* backingObject = protectedSelf.get().axBackingObject;
         if (!backingObject)
             return nil;
@@ -1280,7 +1280,7 @@
             it.advance();
         }
 
-        return attrString.autorelease();
+        return attrString;
     });
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to