diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-02 15:31:56 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-02 15:31:56 +0000 |
commit | d583c3a30db9474b0dcef5128ec6901c8ff23b98 (patch) | |
tree | 227db6cd60ac59d5e4990d1afa9de091af5295db /net | |
parent | 4bacb82375e04d44967e71afc1fa6e1018f9810b (diff) | |
download | chromium_src-d583c3a30db9474b0dcef5128ec6901c8ff23b98.zip chromium_src-d583c3a30db9474b0dcef5128ec6901c8ff23b98.tar.gz chromium_src-d583c3a30db9474b0dcef5128ec6901c8ff23b98.tar.bz2 |
Thread::Stop() must be called before any subclass's destructor completes.
Update base::Thread documentation, fix all subclasses I could find
that had a problem, and remove no-longer-necessary suppressions.
BUG=102134
Review URL: http://codereview.chromium.org/8427007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/network_change_notifier_linux.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/base/network_change_notifier_linux.cc b/net/base/network_change_notifier_linux.cc index 77d8043..1e6db14 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(); } |