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

Unified Diff: net/base/network_change_notifier_linux.cc

Issue 8427007: Thread::Stop() must be called before any subclass's destructor completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest version as trybot-ted Created 9 years, 1 month 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 | « dbus/test_service.cc ('k') | tools/valgrind/tsan/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier_linux.cc
diff --git a/net/base/network_change_notifier_linux.cc b/net/base/network_change_notifier_linux.cc
index 77d80432366fe3b5842757fd14c8c8684880ac68..1e6db148bb55d5ba84283e64538005660eaf4ecb 100644
--- a/net/base/network_change_notifier_linux.cc
+++ b/net/base/network_change_notifier_linux.cc
@@ -105,7 +105,9 @@ NetworkChangeNotifierLinux::Thread::Thread()
ALLOW_THIS_IN_INITIALIZER_LIST(ptr_factory_(this)) {
}
-NetworkChangeNotifierLinux::Thread::~Thread() {}
+NetworkChangeNotifierLinux::Thread::~Thread() {
+ DCHECK(!Thread::IsRunning());
+}
void NetworkChangeNotifierLinux::Thread::Init() {
resolv_file_watcher_.reset(new FilePathWatcher);
@@ -214,8 +216,8 @@ NetworkChangeNotifierLinux::NetworkChangeNotifierLinux()
}
NetworkChangeNotifierLinux::~NetworkChangeNotifierLinux() {
- // We don't need to explicitly Stop(), but doing so allows us to sanity-
- // check that the notifier thread shut down properly.
+ // Stopping from here allows us to sanity- check that the notifier
+ // thread shut down properly.
notifier_thread_->Stop();
}
« no previous file with comments | « dbus/test_service.cc ('k') | tools/valgrind/tsan/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698