| Summary: | Transfer ownership to ARC in speechSynthesisGetDefaultVoiceIdentifierForLocale | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sihui Liu <sihui_liu> | ||||||
| Component: | Accessibility | Assignee: | Sihui Liu <sihui_liu> | ||||||
| Status: | RESOLVED INVALID | ||||||||
| Severity: | Normal | CC: | achristensen, cdumez, cfleizach, darin, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Sihui Liu
2021-05-03 09:40:47 PDT
Created attachment 427569 [details]
Patch
Committed r276913 (237257@main): <https://commits.webkit.org/237257@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427569 [details]. Comment on attachment 427569 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427569&action=review > Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm:230 > + return adoptCF(GetIdentifierStringForPreferredVoiceInListWithLocale(speechSynthesisGetVoiceIdentifiers().get(), (__bridge CFLocaleRef)userLocale)).bridgingAutorelease(); This looks wrong and looks like an overrelease which could introduce a security bug. A function named GetIdentifierStringForPreferredVoiceInListWithLocale will *not* return a retained CFStringRef that should be released or adopted. There’s something deeper going on here. If there’s a memory leak, then the is not the correct fix for that cause. Reopening to attach new patch. Created attachment 427591 [details]
[fast-cq] Patch
Committed r276921 (237263@main): <https://commits.webkit.org/237263@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427591 [details]. Revert the change as GetIdentifierStringForPreferredVoiceInListWithLocale does not actually returns a copy like Darin said, so it's not on us to release it. |