| Index: chrome/browser/media/media_stream_capture_indicator.cc
|
| diff --git a/chrome/browser/media/media_stream_capture_indicator.cc b/chrome/browser/media/media_stream_capture_indicator.cc
|
| index 6cc6b5323e0502019e87b08d80edc5f69aaba0a4..14de99795aa4b21b9998682e6f898d44aeac9d0b 100644
|
| --- a/chrome/browser/media/media_stream_capture_indicator.cc
|
| +++ b/chrome/browser/media/media_stream_capture_indicator.cc
|
| @@ -475,6 +475,12 @@ void MediaStreamCaptureIndicator::RemoveCaptureDeviceTab(
|
| if (iter->audio_ref_count == 0 && iter->video_ref_count == 0 &&
|
| iter->tab_capture_ref_count == 0)
|
| tabs_.erase(iter);
|
| +
|
| + // Notify the cached web_contents if the render view has changed. We expect
|
| + // that it is still valid since we get a capture indicator removed event
|
| + // before the web_contents is destroyed.
|
| + if (!web_contents && iter->web_contents)
|
| + web_contents = iter->web_contents;
|
| }
|
|
|
| if (web_contents)
|
|
|