| Index: net/base/network_config_watcher_mac.cc
|
| diff --git a/net/base/network_config_watcher_mac.cc b/net/base/network_config_watcher_mac.cc
|
| index afec17d91f4eeccaaf4a59cd27143174e65b5f74..857dc0f4934374c1a18669e5224abed04a35805c 100644
|
| --- a/net/base/network_config_watcher_mac.cc
|
| +++ b/net/base/network_config_watcher_mac.cc
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/threading/thread.h"
|
| +#include "base/threading/thread_restrictions.h"
|
| #include "base/mac/scoped_cftyperef.h"
|
|
|
| namespace net {
|
| @@ -54,10 +55,17 @@ NetworkConfigWatcherMacThread::NetworkConfigWatcherMacThread(
|
| ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {}
|
|
|
| NetworkConfigWatcherMacThread::~NetworkConfigWatcherMacThread() {
|
| - Stop();
|
| + // As nothing in this thread is allowed to perform blocking I/O
|
| + // we are save to permit this for the thread's termination.
|
| + {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| + Stop();
|
| + }
|
| }
|
|
|
| void NetworkConfigWatcherMacThread::Init() {
|
| + base::ThreadRestrictions::SetIOAllowed(false);
|
| +
|
| // TODO(willchan): Look to see if there's a better signal for when it's ok to
|
| // initialize this, rather than just delaying it by a fixed time.
|
| const int kInitializationDelayMS = 1000;
|
|
|