Changeset 240076 in webkit
- Timestamp:
- Jan 16, 2019, 3:28:11 PM (8 years ago)
- Location:
- branches/safari-607-branch/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
-
branches/safari-607-branch/Source/WebCore/ChangeLog
r240075 r240076 1 2019-01-15 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r239889. rdar://problem/47260233 4 5 REGRESSION(r239419): Crash in AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC() 6 https://bugs.webkit.org/show_bug.cgi?id=193342 7 <rdar://problem/47119836> 8 9 Reviewed by Eric Carlson. 10 11 Make the TapStorage used by AudioSourceProviderAVFObjC thread-safe RefCounted. 12 13 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h: 14 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: 15 (WebCore::AudioSourceProviderAVFObjC::initCallback): 16 (WebCore::AudioSourceProviderAVFObjC::finalizeCallback): 17 18 19 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239889 268f45cc-cd09-0410-ab3c-d52691b4dbfc 20 21 2019-01-11 Jer Noble <jer.noble@apple.com> 22 23 REGRESSION(r239419): Crash in AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC() 24 https://bugs.webkit.org/show_bug.cgi?id=193342 25 <rdar://problem/47119836> 26 27 Reviewed by Eric Carlson. 28 29 Make the TapStorage used by AudioSourceProviderAVFObjC thread-safe RefCounted. 30 31 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h: 32 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: 33 (WebCore::AudioSourceProviderAVFObjC::initCallback): 34 (WebCore::AudioSourceProviderAVFObjC::finalizeCallback): 35 1 36 2019-01-15 Alan Coon <alancoon@apple.com> 2 37 -
branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h
r217878 r240076 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 -
branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm
r239458 r240076 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.