Fix heap-use-after-free issue with WebAudioCapturerSource.
WebAudioCapturerSource registers with a blink WebMediaStreamSource.
When the audio track was stopped, the WebAudioCapturerSource was
destroyed and the WebMediaStreamSource was left with a dangling
pointer, which it tried to use, resulting in access to freed
memory and usually a crashed tab.
This CL makes WebAudioCapturerSource aware of the WebMediaStreamSource
with which it is registered, so that it can be deregistered when the
audio track is stopped.
TEST=See testcase.html in crbug.com/473253
Review URL: https://codereview.chromium.org/1071063005
3 files changed