Commit 8c6a6fa5 authored by sergeyu's avatar sergeyu Committed by Commit bot

Fix DCHECK in the chromoting host when disconnecting a WebRTC connection.

WebRTC creates threads internally. Thread::Stop() is a blocking operation,
so it's not allowed on the network thread. To work around this problem
WebrtcTransport::PeerConnectionWrapper uses ScopedAllowIO when closing
PeerConnection. But it's not longer enough - some threads are stopped
later when the factory is destroyed. Updated PeerConnectionWrapper
destructor to destroy the PeerConnectionFactory with ScopedAllowIO.

BUG=714699

Review-Url: https://codereview.chromium.org/2847803003
Cr-Commit-Position: refs/heads/master@{#467838}
parent 3e1e45d5
...@@ -208,6 +208,9 @@ class WebrtcTransport::PeerConnectionWrapper ...@@ -208,6 +208,9 @@ class WebrtcTransport::PeerConnectionWrapper
// See crbug.com/660081. // See crbug.com/660081.
base::ThreadRestrictions::ScopedAllowIO allow_io; base::ThreadRestrictions::ScopedAllowIO allow_io;
peer_connection_->Close(); peer_connection_->Close();
peer_connection_ = nullptr;
peer_connection_factory_ = nullptr;
audio_module_ = nullptr;
} }
WebrtcAudioModule* audio_module() { WebrtcAudioModule* audio_module() {
......
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