⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 276150 in webkit


Ignore:
Timestamp:
Apr 16, 2021, 12:04:02 PM (5 years ago)
Author:
Russell Epstein
Message:

Revert "Cherry-pick r274819. rdar://problem/76373741"

This reverts commit r276044.

Location:
branches/safari-611-branch/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-611-branch/Source/WebCore/ChangeLog

    r276140 r276150  
    815815            (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): Fixed what is now believed to be
    816816            the root cause of the bug 221786.
    817 
    818 2021-04-15  Russell Epstein  <repstein@apple.com>
    819 
    820         Cherry-pick r274819. rdar://problem/76373741
    821 
    822     AVAudioSessionCaptureDeviceManager should use crossThreadCopy
    823     https://bugs.webkit.org/show_bug.cgi?id=223565
    824     <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 member
    831     variables from `private:` to `protected:` so derived classes can access them
    832     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): Use
    841     `WTFMove(deviceList).isolatedCopy()` when moving from AVAudioSession queue
    842     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-d52691b4dbfc
    846 
    847     2021-03-22  Eric Carlson  <eric.carlson@apple.com>
    848 
    849             AVAudioSessionCaptureDeviceManager should use crossThreadCopy
    850             https://bugs.webkit.org/show_bug.cgi?id=223565
    851             <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 member
    858             variables from `private:` to `protected:` so derived classes can access them
    859             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): Use
    868             `WTFMove(deviceList).isolatedCopy()` when moving from AVAudioSession queue
    869             to main thread.
    870             (WebCore::AVAudioSessionCaptureDeviceManager::getCaptureDevices): Ditto.
    871817
    8728182021-04-15  Russell Epstein  <repstein@apple.com>
  • branches/safari-611-branch/Source/WebCore/platform/mediastream/CaptureDevice.h

    r276044 r276150  
    131131#endif
    132132
    133 protected:
     133private:
    134134    String m_persistentId;
    135135    DeviceType m_type { DeviceType::Unknown };
  • branches/safari-611-branch/Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDevice.h

    r276044 r276150  
    4040    virtual ~AVAudioSessionCaptureDevice() = default;
    4141
    42     AVAudioSessionCaptureDevice isolatedCopy() &&;
    43 
    4442private:
    4543    AVAudioSessionCaptureDevice(AVAudioSessionPortDescription *deviceInput, AVAudioSessionPortDescription *defaultInput);
    46     AVAudioSessionCaptureDevice(const String& persistentId, DeviceType, const String& label, const String& groupId, bool isEnabled, bool isDefault, bool isMock);
    4744};
    4845
  • branches/safari-611-branch/Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDevice.mm

    r276044 r276150  
    4545}
    4646
    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 
    6847}
    6948
  • branches/safari-611-branch/Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm

    r276044 r276150  
    167167    dispatch_sync(m_dispatchQueue, makeBlockPtr([&] {
    168168        newAudioDevices = retrieveAudioSessionCaptureDevices();
    169     });
    170     setAudioCaptureDevices(WTFMove(newAudioDevices).isolatedCopy());
     169    }).get());
     170    setAudioCaptureDevices(WTFMove(newAudioDevices));
    171171}
    172172
     
    183183    dispatch_async(m_dispatchQueue, makeBlockPtr([this, completion = WTFMove(completion)] () mutable {
    184184        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 {
    186186            setAudioCaptureDevices(WTFMove(newAudioDevices));
    187187            completion(copyToVector(*m_devices));
Note: See TracChangeset for help on using the changeset viewer.