summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-22 22:07:41 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-22 22:07:41 +0000
commitf0b8e79437fb0d743825c7b66ae1931ee414e7ff (patch)
tree64d5a6508bace00ecf528b1ff0f516ccf790d54b
parentc704ac9353d6386c782175732df76cbcfe3eeed7 (diff)
downloadchromium_src-f0b8e79437fb0d743825c7b66ae1931ee414e7ff.zip
chromium_src-f0b8e79437fb0d743825c7b66ae1931ee414e7ff.tar.gz
chromium_src-f0b8e79437fb0d743825c7b66ae1931ee414e7ff.tar.bz2
Fix crash in ChromotingHost::Shutdown().
The method was calling callback with a lock held which is incorrect. BUG=None TEST=Click disconnect button, the plugin doesn't crash. Review URL: http://codereview.chromium.org/7241002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90117 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--remoting/host/chromoting_host.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 33169a4..917edb0 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -137,8 +137,8 @@ void ChromotingHost::Shutdown(Task* shutdown_task) {
base::AutoLock auto_lock(lock_);
if (state_ == kInitial || state_ == kStopped) {
// Nothing to do if we are not started.
- base::ScopedTaskRunner run_task(shutdown_task);
state_ = kStopped;
+ context_->main_message_loop()->PostTask(FROM_HERE, shutdown_task);
return;
}
if (shutdown_task)