Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: remoting/host/security_key/remote_security_key_message_reader_impl.cc

Issue 1860693003: Fixing a Dr. memory failure in the remoting unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fake_message_classes
Patch Set: Addressing feedback Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/security_key/remote_security_key_message_reader_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/security_key/remote_security_key_message_reader_impl.cc
diff --git a/remoting/host/security_key/remote_security_key_message_reader_impl.cc b/remoting/host/security_key/remote_security_key_message_reader_impl.cc
index 2eb441856aa102ddf8b88b9201c03364a1ea223a..0431742ff77d8c2d8210b5bfbc3c91458ae39a22 100644
--- a/remoting/host/security_key/remote_security_key_message_reader_impl.cc
+++ b/remoting/host/security_key/remote_security_key_message_reader_impl.cc
@@ -34,9 +34,8 @@ RemoteSecurityKeyMessageReaderImpl::RemoteSecurityKeyMessageReaderImpl(
RemoteSecurityKeyMessageReaderImpl::~RemoteSecurityKeyMessageReaderImpl() {
DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
- // In order to ensure the reader thread is stopped cleanly, we close the
- // stream it is blocking on and then wait for the thread to exit.
- read_stream_.Close();
+ // In order to ensure the reader thread is stopped cleanly, we want to stop
+ // the thread before the task runners and weak pointers are invalidated.
reader_thread_.Stop();
}
« no previous file with comments | « no previous file | remoting/host/security_key/remote_security_key_message_reader_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698