[webkit-reviews] review granted: [Bug 223565] AVAudioSessionCaptureDeviceManager should use crossThreadCopy : [Attachment 423848] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 22 02:40:27 PDT 2021

youenn fablet <youennf at gmail.com> has granted Eric Carlson
<eric.carlson at apple.com>'s request for review:
Bug 223565: AVAudioSessionCaptureDeviceManager should use crossThreadCopy

Attachment 423848: Patch


--- Comment #3 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 423848
  --> https://bugs.webkit.org/attachment.cgi?id=423848

View in context: https://bugs.webkit.org/attachment.cgi?id=423848&action=review

> Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDevice.h:42
> +    AVAudioSessionCaptureDevice isolatedCopy() const;

We could try to change it to: AVAudioSessionCaptureDevice isolatedCopy() &&;

> Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:61
> +	   groupId().isolatedCopy(),

If we go with isolatedCopy() &&, doing WTFMove(m_persistentId).isolatedCopy(),
WTFMove(m_groupId).isolatedCopy() will most probably remove the memory
allocation of a new string.

More information about the webkit-reviews mailing list