diff options
author | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-22 23:54:33 +0000 |
---|---|---|
committer | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-22 23:54:33 +0000 |
commit | b25e06ba4e34b5e467f72522a035ff3626ff6183 (patch) | |
tree | 0d045313ab0fe0bb35a2827d8a10c5578cb0c8e4 /remoting | |
parent | 6a1808eaaaa0ec64c3c4094d83a8007c172fa9f7 (diff) | |
download | chromium_src-b25e06ba4e34b5e467f72522a035ff3626ff6183.zip chromium_src-b25e06ba4e34b5e467f72522a035ff3626ff6183.tar.gz chromium_src-b25e06ba4e34b5e467f72522a035ff3626ff6183.tar.bz2 |
[Chromoting] Detach SessionEventExecutor's weak pointer to itself from the constructor thread.
This lets the weak pointer be used on the desktop thread.
BUG=134084
TEST=Bug doesn't repro.
Review URL: https://chromiumcodereview.appspot.com/10661004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/session_event_executor_win.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/remoting/host/session_event_executor_win.cc b/remoting/host/session_event_executor_win.cc index e336011..d68664c 100644 --- a/remoting/host/session_event_executor_win.cc +++ b/remoting/host/session_event_executor_win.cc @@ -53,6 +53,11 @@ SessionEventExecutorWin::SessionEventExecutorWin( message_loop_(message_loop), ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)), weak_ptr_(weak_ptr_factory_.GetWeakPtr()) { + // Let weak_ptr_ be used on the message_loop_ thread. + // weak_ptr_ and weak_ptr_factory_ share a ThreadChecker, so the following + // line affects both of them. + weak_ptr_factory_.DetachFromThread(); + std::string channel_name = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(kProcessChannelId); |