diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-15 19:57:15 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-15 19:57:15 +0000 |
commit | f8b2bb8060b975900ef912e21362ec99dcd1d62c (patch) | |
tree | 0051aaa446cbedd23e54131c924db7e14c6633d8 /remoting/protocol | |
parent | 9b18c10a99bf44dcbc1372b78d7e84e1314f6f20 (diff) | |
download | chromium_src-f8b2bb8060b975900ef912e21362ec99dcd1d62c.zip chromium_src-f8b2bb8060b975900ef912e21362ec99dcd1d62c.tar.gz chromium_src-f8b2bb8060b975900ef912e21362ec99dcd1d62c.tar.bz2 |
Fix DCHECK when sharing is aborted on the host while connecting.
Previously ConnectionToClient::Disconnect() was destroying JingleSession
only after Close() returns. Now it leaves it to the ConnectionToClient
destructor, which ensures that JingleSession is always destroyed before
JingleSessionManager.
BUG=160326
Review URL: https://codereview.chromium.org/11410104
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167998 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol')
-rw-r--r-- | remoting/protocol/connection_to_client.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/remoting/protocol/connection_to_client.cc b/remoting/protocol/connection_to_client.cc index eb08a5f..3ba0a24 100644 --- a/remoting/protocol/connection_to_client.cc +++ b/remoting/protocol/connection_to_client.cc @@ -45,12 +45,9 @@ void ConnectionToClient::Disconnect() { CloseChannels(); - DCHECK(session_.get()); - scoped_ptr<Session> session = session_.Pass(); - // This should trigger OnConnectionClosed() event and this object // may be destroyed as the result. - session->Close(); + session_->Close(); } void ConnectionToClient::UpdateSequenceNumber(int64 sequence_number) { |