summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_config_service_mac.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy/proxy_config_service_mac.cc')
-rw-r--r--net/proxy/proxy_config_service_mac.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/proxy/proxy_config_service_mac.cc b/net/proxy/proxy_config_service_mac.cc
index ffc9c77..df26466 100644
--- a/net/proxy/proxy_config_service_mac.cc
+++ b/net/proxy/proxy_config_service_mac.cc
@@ -187,17 +187,19 @@ class ProxyConfigServiceMac::Helper
ProxyConfigServiceMac::ProxyConfigServiceMac(MessageLoop* io_loop)
: forwarder_(this),
- config_watcher_(&forwarder_),
has_fetched_config_(false),
helper_(new Helper(this)),
io_loop_(io_loop) {
DCHECK(io_loop);
+ config_watcher_.reset(new NetworkConfigWatcherMac(&forwarder_));
}
ProxyConfigServiceMac::~ProxyConfigServiceMac() {
DCHECK_EQ(io_loop_, MessageLoop::current());
+ // Delete the config_watcher_ to ensure the notifier thread finishes before
+ // this object is destroyed.
+ config_watcher_.reset();
helper_->Orphan();
- io_loop_ = NULL;
}
void ProxyConfigServiceMac::AddObserver(Observer* observer) {