WebKit Bugzilla
Attachment 358905 Details for
Bug 193342
: REGRESSION(r239419): Crash in AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193342-20190111101943.patch (text/plain), 3.53 KB, created by
Jer Noble
on 2019-01-11 10:19:44 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2019-01-11 10:19:44 PST
Size:
3.53 KB
patch
obsolete
>Subversion Revision: 239644 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 57ff5fcd71b7b77bcfae1a72004fa5f82c17f060..c7a34cb68182c69e45d007e2e14cd7dddaaa926b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2019-01-10 Jer Noble <jer.noble@apple.com> >+ >+ REGRESSION(r239419): Crash in AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC() >+ https://bugs.webkit.org/show_bug.cgi?id=193342 >+ <rdar://problem/47119836> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make the TapStorage used by AudioSourceProviderAVFObjC thread-safe RefCounted. >+ >+ * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h: >+ * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: >+ (WebCore::AudioSourceProviderAVFObjC::initCallback): >+ (WebCore::AudioSourceProviderAVFObjC::finalizeCallback): >+ > 2019-01-09 Jer Noble <jer.noble@apple.com> > > <video> elements do not enter 'paused' state when playing to end over AirPlay >diff --git a/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h b/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h >index 56ce2fe62c75c0ab3cbff3d9234d53114bb8e786..b1ff2a2c8a706fe6b0d5e757076152c874ec62d1 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h >+++ b/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h >@@ -98,8 +98,8 @@ private: > bool m_paused { true }; > AudioSourceProviderClient* m_client { nullptr }; > >- struct TapStorage; >- TapStorage* m_tapStorage { nullptr }; >+ class TapStorage; >+ RefPtr<TapStorage> m_tapStorage; > }; > > } >diff --git a/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm >index 15b6b93c07d70608df60d6070c1db5e724977e77..46090561811ed1c4482721015e7ec41b2eb90f8d 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm >@@ -69,7 +69,8 @@ namespace WebCore { > using namespace PAL; > static const double kRingBufferDuration = 1; > >-struct AudioSourceProviderAVFObjC::TapStorage { >+class AudioSourceProviderAVFObjC::TapStorage : public ThreadSafeRefCounted<AudioSourceProviderAVFObjC::TapStorage> { >+public: > TapStorage(AudioSourceProviderAVFObjC* _this) : _this(_this) { } > AudioSourceProviderAVFObjC* _this; > Lock mutex; >@@ -238,9 +239,12 @@ void AudioSourceProviderAVFObjC::initCallback(MTAudioProcessingTapRef tap, void* > ASSERT(tap); > AudioSourceProviderAVFObjC* _this = static_cast<AudioSourceProviderAVFObjC*>(clientInfo); > _this->m_tap = adoptCF(tap); >- _this->m_tapStorage = new TapStorage(_this); >+ _this->m_tapStorage = adoptRef(new TapStorage(_this)); > _this->init(clientInfo, tapStorageOut); >- *tapStorageOut = _this->m_tapStorage; >+ *tapStorageOut = _this->m_tapStorage.get(); >+ >+ // ref balanced by deref in finalizeCallback: >+ _this->m_tapStorage->ref(); > } > > void AudioSourceProviderAVFObjC::finalizeCallback(MTAudioProcessingTapRef tap) >@@ -253,7 +257,7 @@ void AudioSourceProviderAVFObjC::finalizeCallback(MTAudioProcessingTapRef tap) > if (tapStorage->_this) > tapStorage->_this->finalize(); > } >- delete tapStorage; >+ tapStorage->deref(); > } > > void AudioSourceProviderAVFObjC::prepareCallback(MTAudioProcessingTapRef tap, CMItemCount maxFrames, const AudioStreamBasicDescription *processingFormat)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193342
:
358839
|
358864
| 358905