Changeset 276150 in webkit
- Timestamp:
- Apr 16, 2021, 12:04:02 PM (5 years ago)
- Location:
- branches/safari-611-branch/Source/WebCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
platform/mediastream/CaptureDevice.h (modified) (1 diff)
-
platform/mediastream/ios/AVAudioSessionCaptureDevice.h (modified) (1 diff)
-
platform/mediastream/ios/AVAudioSessionCaptureDevice.mm (modified) (1 diff)
-
platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-611-branch/Source/WebCore/ChangeLog
r276140 r276150 815 815 (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): Fixed what is now believed to be 816 816 the root cause of the bug 221786. 817 818 2021-04-15 Russell Epstein <repstein@apple.com>819 820 Cherry-pick r274819. rdar://problem/76373741821 822 AVAudioSessionCaptureDeviceManager should use crossThreadCopy823 https://bugs.webkit.org/show_bug.cgi?id=223565824 <rdar://75480589>825 826 Reviewed by Youenn Fablet.827 828 Tested manually, this can only be tested on device.829 830 * platform/mediastream/CaptureDevice.h: Change access restriction for member831 variables from `private:` to `protected:` so derived classes can access them832 directly.833 834 * platform/mediastream/ios/AVAudioSessionCaptureDevice.h:835 * platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:836 (WebCore::AVAudioSessionCaptureDevice::AVAudioSessionCaptureDevice): New constructor.837 (WebCore::AVAudioSessionCaptureDevice::isolatedCopy const): New.838 839 * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:840 (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices): Use841 `WTFMove(deviceList).isolatedCopy()` when moving from AVAudioSession queue842 to main thread.843 (WebCore::AVAudioSessionCaptureDeviceManager::getCaptureDevices): Ditto.844 845 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274819 268f45cc-cd09-0410-ab3c-d52691b4dbfc846 847 2021-03-22 Eric Carlson <eric.carlson@apple.com>848 849 AVAudioSessionCaptureDeviceManager should use crossThreadCopy850 https://bugs.webkit.org/show_bug.cgi?id=223565851 <rdar://75480589>852 853 Reviewed by Youenn Fablet.854 855 Tested manually, this can only be tested on device.856 857 * platform/mediastream/CaptureDevice.h: Change access restriction for member858 variables from `private:` to `protected:` so derived classes can access them859 directly.860 861 * platform/mediastream/ios/AVAudioSessionCaptureDevice.h:862 * platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:863 (WebCore::AVAudioSessionCaptureDevice::AVAudioSessionCaptureDevice): New constructor.864 (WebCore::AVAudioSessionCaptureDevice::isolatedCopy const): New.865 866 * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:867 (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices): Use868 `WTFMove(deviceList).isolatedCopy()` when moving from AVAudioSession queue869 to main thread.870 (WebCore::AVAudioSessionCaptureDeviceManager::getCaptureDevices): Ditto.871 817 872 818 2021-04-15 Russell Epstein <repstein@apple.com> -
branches/safari-611-branch/Source/WebCore/platform/mediastream/CaptureDevice.h
r276044 r276150 131 131 #endif 132 132 133 pr otected:133 private: 134 134 String m_persistentId; 135 135 DeviceType m_type { DeviceType::Unknown }; -
branches/safari-611-branch/Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDevice.h
r276044 r276150 40 40 virtual ~AVAudioSessionCaptureDevice() = default; 41 41 42 AVAudioSessionCaptureDevice isolatedCopy() &&;43 44 42 private: 45 43 AVAudioSessionCaptureDevice(AVAudioSessionPortDescription *deviceInput, AVAudioSessionPortDescription *defaultInput); 46 AVAudioSessionCaptureDevice(const String& persistentId, DeviceType, const String& label, const String& groupId, bool isEnabled, bool isDefault, bool isMock);47 44 }; 48 45 -
branches/safari-611-branch/Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDevice.mm
r276044 r276150 45 45 } 46 46 47 AVAudioSessionCaptureDevice::AVAudioSessionCaptureDevice(const String& persistentId, DeviceType type, const String& label, const String& groupId, bool isEnabled, bool isDefault, bool isMock)48 : CaptureDevice(persistentId, type, label, groupId)49 {50 setEnabled(isEnabled);51 setIsDefault(isDefault);52 setIsMockDevice(isMock);53 }54 55 AVAudioSessionCaptureDevice AVAudioSessionCaptureDevice::isolatedCopy() &&56 {57 return {58 WTFMove(m_persistentId).isolatedCopy(),59 m_type,60 WTFMove(m_label).isolatedCopy(),61 WTFMove(m_groupId).isolatedCopy(),62 m_enabled,63 m_default,64 m_isMockDevice,65 };66 }67 68 47 } 69 48 -
branches/safari-611-branch/Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm
r276044 r276150 167 167 dispatch_sync(m_dispatchQueue, makeBlockPtr([&] { 168 168 newAudioDevices = retrieveAudioSessionCaptureDevices(); 169 }) ;170 setAudioCaptureDevices(WTFMove(newAudioDevices) .isolatedCopy());169 }).get()); 170 setAudioCaptureDevices(WTFMove(newAudioDevices)); 171 171 } 172 172 … … 183 183 dispatch_async(m_dispatchQueue, makeBlockPtr([this, completion = WTFMove(completion)] () mutable { 184 184 auto newAudioDevices = retrieveAudioSessionCaptureDevices(); 185 callOnWebThreadOrDispatchAsyncOnMainThread(makeBlockPtr([this, completion = WTFMove(completion), newAudioDevices = WTFMove(newAudioDevices) .isolatedCopy()] () mutable {185 callOnWebThreadOrDispatchAsyncOnMainThread(makeBlockPtr([this, completion = WTFMove(completion), newAudioDevices = WTFMove(newAudioDevices)] () mutable { 186 186 setAudioCaptureDevices(WTFMove(newAudioDevices)); 187 187 completion(copyToVector(*m_devices));
Note:
See TracChangeset
for help on using the changeset viewer.