Safari WebKitWebRTCAudioModule crash during <video> tag update when audio track prese...
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2018 16:55:10 +0000 (16:55 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2018 16:55:10 +0000 (16:55 +0000)
commitffe01bb35cd36e88637084cf64c0bb56e03e6cfb
treeba1027b6979b7b18fad9eaaa788bdb61d3469841
parent343c123e316bc9335f95865f1f64e762678f8ebd
Safari WebKitWebRTCAudioModule crash during <video> tag update when audio track present in MediaStream
https://bugs.webkit.org/show_bug.cgi?id=181180
<rdar://problem/36302375>

Reviewed by Eric Carlson.

Source/WebCore:

Test: webrtc/video-update-often.html

AudioTrackPrivateMediaStreamCocoa needs to be destroyed in the main thread since it owns a Ref to its MediaStreamTrackPrivate.
We can still ref it on a background thread but we always deref it on the main thread.

* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
(WebCore::AudioTrackPrivateMediaStreamCocoa::render):

LayoutTests:

* webrtc/video-update-often-expected.txt: Added.
* webrtc/video-update-often.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webrtc/video-update-often-expected.txt [new file with mode: 0644]
LayoutTests/webrtc/video-update-often.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp