Title: [276913] trunk/Source/WebCore
Revision
276913
Author
[email protected]
Date
2021-05-03 11:51:05 -0700 (Mon, 03 May 2021)

Log Message

Transfer ownership to ARC in speechSynthesisGetDefaultVoiceIdentifierForLocale
https://bugs.webkit.org/show_bug.cgi?id=225312
<rdar://problem/77458746>

Reviewed by Chris Fleizach.

To fix memory leak of defaultVoiceURI.

* platform/mac/PlatformSpeechSynthesizerMac.mm:
(WebCore::speechSynthesisGetDefaultVoiceIdentifierForLocale):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (276912 => 276913)


--- trunk/Source/WebCore/ChangeLog	2021-05-03 18:35:23 UTC (rev 276912)
+++ trunk/Source/WebCore/ChangeLog	2021-05-03 18:51:05 UTC (rev 276913)
@@ -1,3 +1,16 @@
+2021-05-03  Sihui Liu  <[email protected]>
+
+        Transfer ownership to ARC in speechSynthesisGetDefaultVoiceIdentifierForLocale
+        https://bugs.webkit.org/show_bug.cgi?id=225312
+        <rdar://problem/77458746>
+
+        Reviewed by Chris Fleizach.
+
+        To fix memory leak of defaultVoiceURI.
+
+        * platform/mac/PlatformSpeechSynthesizerMac.mm:
+        (WebCore::speechSynthesisGetDefaultVoiceIdentifierForLocale):
+
 2021-05-03  Tim Nguyen  <[email protected]>
 
         Remove "no-preference" value for prefers-color-scheme media query

Modified: trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm (276912 => 276913)


--- trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm	2021-05-03 18:35:23 UTC (rev 276912)
+++ trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm	2021-05-03 18:51:05 UTC (rev 276913)
@@ -227,7 +227,7 @@
     if (!userLocale)
         return nil;
 
-    return (__bridge NSString *)GetIdentifierStringForPreferredVoiceInListWithLocale(speechSynthesisGetVoiceIdentifiers().get(), (__bridge CFLocaleRef)userLocale);
+    return adoptCF(GetIdentifierStringForPreferredVoiceInListWithLocale(speechSynthesisGetVoiceIdentifiers().get(), (__bridge CFLocaleRef)userLocale)).bridgingAutorelease();
 }
 
 void PlatformSpeechSynthesizer::initializeVoiceList()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to