Commit fd2ad3f9 authored by xians@chromium.org's avatar xians@chromium.org

When using peerconnection, the browser will crash when we close down the...

When using peerconnection, the browser will crash when we close down the browser because in media_stream_capture_indicator.cc we delete an iter without updating it to the next iterator in a loop.

TBR=Tommi@chromium.org

BUG=143120
TEST=chrome/test/functional/webrtc_call.py

Review URL: https://chromiumcodereview.appspot.com/10831370

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152084 0039d316-1c4b-4281-b951-d872f2087c98
parent a0e97ea5
...@@ -331,12 +331,12 @@ void MediaStreamCaptureIndicator::UpdateStatusTrayIconContextMenu() { ...@@ -331,12 +331,12 @@ void MediaStreamCaptureIndicator::UpdateStatusTrayIconContextMenu() {
bool video = false; bool video = false;
int command_id = IDC_MEDIA_CONTEXT_MEDIA_STREAM_CAPTURE_LIST_FIRST; int command_id = IDC_MEDIA_CONTEXT_MEDIA_STREAM_CAPTURE_LIST_FIRST;
for (CaptureDeviceTabs::iterator iter = tabs_.begin(); for (CaptureDeviceTabs::iterator iter = tabs_.begin();
iter != tabs_.end(); ++iter) { iter != tabs_.end();) {
string16 tab_title = GetTitle(iter->render_process_id, string16 tab_title = GetTitle(iter->render_process_id,
iter->render_view_id); iter->render_view_id);
if (tab_title.empty()) { if (tab_title.empty()) {
// Delete the entry since the tab has gone away. // Delete the entry since the tab has gone away.
tabs_.erase(iter); iter = tabs_.erase(iter);
continue; continue;
} }
...@@ -353,6 +353,7 @@ void MediaStreamCaptureIndicator::UpdateStatusTrayIconContextMenu() { ...@@ -353,6 +353,7 @@ void MediaStreamCaptureIndicator::UpdateStatusTrayIconContextMenu() {
break; break;
++command_id; ++command_id;
++iter;
} }
if (!audio && !video) { if (!audio && !video) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment