Changeset 239889 in webkit
- Timestamp:
- Jan 11, 2019, 5:22:58 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h (modified) (1 diff)
-
platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r239888 r239889 1 2019-01-11 Jer Noble <jer.noble@apple.com> 2 3 REGRESSION(r239419): Crash in AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC() 4 https://bugs.webkit.org/show_bug.cgi?id=193342 5 <rdar://problem/47119836> 6 7 Reviewed by Eric Carlson. 8 9 Make the TapStorage used by AudioSourceProviderAVFObjC thread-safe RefCounted. 10 11 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h: 12 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: 13 (WebCore::AudioSourceProviderAVFObjC::initCallback): 14 (WebCore::AudioSourceProviderAVFObjC::finalizeCallback): 15 1 16 2019-01-11 John Wilander <wilander@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h
r217878 r239889 99 99 AudioSourceProviderClient* m_client { nullptr }; 100 100 101 structTapStorage;102 TapStorage* m_tapStorage { nullptr };101 class TapStorage; 102 RefPtr<TapStorage> m_tapStorage; 103 103 }; 104 104 -
trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm
r239458 r239889 70 70 static const double kRingBufferDuration = 1; 71 71 72 struct AudioSourceProviderAVFObjC::TapStorage { 72 class AudioSourceProviderAVFObjC::TapStorage : public ThreadSafeRefCounted<AudioSourceProviderAVFObjC::TapStorage> { 73 public: 73 74 TapStorage(AudioSourceProviderAVFObjC* _this) : _this(_this) { } 74 75 AudioSourceProviderAVFObjC* _this; … … 239 240 AudioSourceProviderAVFObjC* _this = static_cast<AudioSourceProviderAVFObjC*>(clientInfo); 240 241 _this->m_tap = adoptCF(tap); 241 _this->m_tapStorage = new TapStorage(_this);242 _this->m_tapStorage = adoptRef(new TapStorage(_this)); 242 243 _this->init(clientInfo, tapStorageOut); 243 *tapStorageOut = _this->m_tapStorage; 244 *tapStorageOut = _this->m_tapStorage.get(); 245 246 // ref balanced by deref in finalizeCallback: 247 _this->m_tapStorage->ref(); 244 248 } 245 249 … … 254 258 tapStorage->_this->finalize(); 255 259 } 256 delete tapStorage;260 tapStorage->deref(); 257 261 } 258 262
Note:
See TracChangeset
for help on using the changeset viewer.