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

Unified Diff: chrome/browser/local_discovery/service_discovery_client_mac.mm

Issue 346873002: Speculatively fix OSX crashes involving service removal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6e91e6285b141c6555bfdda0aa0a915d0705ac04..9ad75b4db07eb9ecb5603a869a9210066e517409 100644
--- a/chrome/browser/local_discovery/service_discovery_client_mac.mm
+++ b/chrome/browser/local_discovery/service_discovery_client_mac.mm
@@ -431,11 +431,12 @@ ServiceResolverImplMac::GetContainerForTesting() {
- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser
didRemoveService:(NSNetService *)netService
moreComing:(BOOL)moreServicesComing {
- container_->OnServicesUpdate(local_discovery::ServiceWatcher::UPDATE_REMOVED,
- [[netService name] UTF8String]);
-
NSUInteger index = [services_ indexOfObject:netService];
if (index != NSNotFound) {
+ container_->OnServicesUpdate(
+ local_discovery::ServiceWatcher::UPDATE_REMOVED,
+ [[netService name] UTF8String]);
+
// Stop monitoring this service for updates.
[[services_ objectAtIndex:index] stopMonitoring];
[services_ removeObjectAtIndex:index];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698