| Index: chrome/browser/local_discovery/service_discovery_client_mac.mm
|
| diff --git a/chrome/browser/local_discovery/service_discovery_client_mac.mm b/chrome/browser/local_discovery/service_discovery_client_mac.mm
|
| index 6f014fbc2adec82e1a59d3fc869aa9bfbb369a4a..23f77f54537b827b0b9ac2e09889471f9dfae4ea 100644
|
| --- a/chrome/browser/local_discovery/service_discovery_client_mac.mm
|
| +++ b/chrome/browser/local_discovery/service_discovery_client_mac.mm
|
| @@ -186,6 +186,13 @@ void ParseTxtRecord(NSData* record, std::vector<std::string>* output) {
|
| ServiceWatcherImplMac::NetServiceBrowserContainer::
|
| ~NetServiceBrowserContainer() {
|
| DCHECK(IsOnServiceDiscoveryThread());
|
| +
|
| + // Work around a 10.12 bug: NSNetServiceBrowser doesn't lose interest in its
|
| + // weak delegate during deallocation, so a subsequently-deallocated delegate
|
| + // attempts to clear the pointer to itself in an NSNetServiceBrowser that's
|
| + // already gone.
|
| + // https://crbug.com/657495, https://openradar.appspot.com/28943305
|
| + [browser_ setDelegate:nil];
|
| }
|
|
|
| void ServiceWatcherImplMac::NetServiceBrowserContainer::Start() {
|
| @@ -299,6 +306,13 @@ void ParseTxtRecord(NSData* record, std::vector<std::string>* output) {
|
|
|
| ServiceResolverImplMac::NetServiceContainer::~NetServiceContainer() {
|
| DCHECK(IsOnServiceDiscoveryThread());
|
| +
|
| + // Work around a 10.12 bug: NSNetService doesn't lose interest in its weak
|
| + // delegate during deallocation, so a subsequently-deallocated delegate
|
| + // attempts to clear the pointer to itself in an NSNetService that's already
|
| + // gone.
|
| + // https://crbug.com/657495, https://openradar.appspot.com/28943305
|
| + [service_ setDelegate:nil];
|
| }
|
|
|
| void ServiceResolverImplMac::NetServiceContainer::StartResolving() {
|
|
|