Index: content/browser/media/webrtc/webrtc_eventlog_host.cc |
diff --git a/content/browser/media/webrtc/webrtc_eventlog_host.cc b/content/browser/media/webrtc/webrtc_eventlog_host.cc |
index 279ed48b0c3d34945318f005986130e09cd49243..80aec9a3f4b1df98bcdf4fff1da62cbb048c54e6 100644 |
--- a/content/browser/media/webrtc/webrtc_eventlog_host.cc |
+++ b/content/browser/media/webrtc/webrtc_eventlog_host.cc |
@@ -78,14 +78,15 @@ WebRTCEventLogHost::~WebRTCEventLogHost() { |
void WebRTCEventLogHost::PeerConnectionAdded(int peer_connection_local_id) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
- DCHECK(std::find(active_peer_connection_local_ids_.begin(), |
- active_peer_connection_local_ids_.end(), |
- peer_connection_local_id) == |
- active_peer_connection_local_ids_.end()); |
- active_peer_connection_local_ids_.push_back(peer_connection_local_id); |
- if (rtc_event_logging_enabled_ && |
- number_active_log_files_ < kMaxNumberLogFiles) { |
- StartEventLogForPeerConnection(peer_connection_local_id); |
+ if (std::find(active_peer_connection_local_ids_.begin(), |
+ active_peer_connection_local_ids_.end(), |
+ peer_connection_local_id) == |
+ active_peer_connection_local_ids_.end()) { |
+ active_peer_connection_local_ids_.push_back(peer_connection_local_id); |
+ if (rtc_event_logging_enabled_ && |
+ number_active_log_files_ < kMaxNumberLogFiles) { |
+ StartEventLogForPeerConnection(peer_connection_local_id); |
+ } |
} |
} |
@@ -94,8 +95,9 @@ void WebRTCEventLogHost::PeerConnectionRemoved(int peer_connection_local_id) { |
const auto found = std::find(active_peer_connection_local_ids_.begin(), |
active_peer_connection_local_ids_.end(), |
peer_connection_local_id); |
- DCHECK(found != active_peer_connection_local_ids_.end()); |
- active_peer_connection_local_ids_.erase(found); |
+ if (found != active_peer_connection_local_ids_.end()) { |
+ active_peer_connection_local_ids_.erase(found); |
+ } |
} |
bool WebRTCEventLogHost::StartWebRTCEventLog(const base::FilePath& file_path) { |