diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-11 01:27:23 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-11 01:27:23 +0000 |
commit | a46bcef82b29d30836a0f26226e3d4aca4fa9612 (patch) | |
tree | 297ff3b78e05b2fb83971d3dee51e0d12ebcf181 /remoting/protocol/jingle_session_manager.cc | |
parent | e7cd8dc6e9199cade000dc48da230f9ada0ccf28 (diff) | |
download | chromium_src-a46bcef82b29d30836a0f26226e3d4aca4fa9612.zip chromium_src-a46bcef82b29d30836a0f26226e3d4aca4fa9612.tar.gz chromium_src-a46bcef82b29d30836a0f26226e3d4aca4fa9612.tar.bz2 |
Access ChromotingHost::clients_ only on network thread.
Previously ChromotingHost was doing some work on the main thread and
some on the network thread. |clients_| and some other members were
accessed without lock on both of these threads. Moved most of the
ChromotingHost activity to the network thread to avoid possible
race conditions.
BUG=96325
TEST=Chromoting works
Review URL: http://codereview.chromium.org/8495024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/jingle_session_manager.cc')
-rw-r--r-- | remoting/protocol/jingle_session_manager.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc index cf85d0f..e1a935d 100644 --- a/remoting/protocol/jingle_session_manager.cc +++ b/remoting/protocol/jingle_session_manager.cc @@ -38,6 +38,8 @@ JingleSessionManager::JingleSessionManager( } JingleSessionManager::~JingleSessionManager() { + // Session manager can be destroyed only after all sessions are destroyed. + DCHECK(sessions_.empty()); Close(); } @@ -111,13 +113,9 @@ void JingleSessionManager::Init( void JingleSessionManager::Close() { DCHECK(CalledOnValidThread()); - // Close() can be called only after all sessions are destroyed. - DCHECK(sessions_.empty()); - if (!closed_) { cricket_session_manager_->RemoveClient(kChromotingXmlNamespace); jingle_signaling_connector_.reset(); - cricket_session_manager_.reset(); closed_ = true; } } |