Summary: | Add AVAudioSessionCaptureDeviceManager::isolatedCopy and use it to copy device list calculated on background queue | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||||||
Component: | WebRTC | Assignee: | Eric Carlson <eric.carlson> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, youennf | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Eric Carlson
2021-03-21 20:24:53 PDT
Created attachment 423848 [details]
Patch
Comment on attachment 423848 [details] Patch 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. Created attachment 423905 [details]
Patch for landing
Comment on attachment 423905 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=423905&action=review > Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:58 > + m_persistentId.isolatedCopy(), WTFMove(m_persistentId) would remove a potential memory allocation. > Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:61 > + m_groupId.isolatedCopy(), Ditto for m_label and m_groupId. Created attachment 423938 [details]
Updated patch for landing
Committed r274819: <https://commits.webkit.org/r274819> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423938 [details]. |