Changeset 277390 in webkit
- Timestamp:
- May 12, 2021, 2:19:06 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r277385 r277390 1 2021-05-12 Jer Noble <jer.noble@apple.com> 2 3 TapStorage::lock freed while locked in AudioSourceProviderAVFObjC::destroyMixIfNeeded() 4 https://bugs.webkit.org/show_bug.cgi?id=225706 5 <rdar://77719381> 6 7 Reviewed by Ryosuke Niwa. 8 9 In r275933, an update was made to protect access to TapStorage during destruction by 10 locking its lock inside destroyMixIfNeeded(), but if TapStorage has a refCount==1 11 during that teardown, the lock itself is destroyed while it is still held. Add an 12 explicit scoping to the lock holder, and only deref the TapStorage outside that 13 locking scope. 14 15 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: 16 (WebCore::AudioSourceProviderAVFObjC::destroyMixIfNeeded): 17 1 18 2021-05-12 Said Abou-Hallawa <said@apple.com> 2 19 -
trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm
r276301 r277390 183 183 return; 184 184 ASSERT(m_tapStorage); 185 auto locker = holdLock(m_tapStorage->lock); 186 if (m_avPlayerItem) 187 [m_avPlayerItem setAudioMix:nil]; 188 [m_avAudioMix setInputParameters:@[ ]]; 189 m_avAudioMix.clear(); 190 m_tap.clear(); 191 m_tapStorage->_this = nullptr; 185 { 186 auto locker = holdLock(m_tapStorage->lock); 187 if (m_avPlayerItem) 188 [m_avPlayerItem setAudioMix:nil]; 189 [m_avAudioMix setInputParameters:@[ ]]; 190 m_avAudioMix.clear(); 191 m_tap.clear(); 192 m_tapStorage->_this = nullptr; 193 // Call unprepare, since Tap cannot call it after clear. 194 unprepare(); 195 m_weakFactory.revokeAll(); 196 } 192 197 m_tapStorage = nullptr; 193 // Call unprepare, since Tap cannot call it after clear.194 unprepare();195 m_weakFactory.revokeAll();196 198 } 197 199
Note:
See TracChangeset
for help on using the changeset viewer.