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

Unified Diff: dbus/bus.cc

Issue 26289002: Track active references in ShillClientHelper (Take 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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 | « chromeos/dbus/shill_service_client.cc ('k') | dbus/object_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/bus.cc
diff --git a/dbus/bus.cc b/dbus/bus.cc
index 3f8e6d7f3b1c32ea7575176a156cdd01a0fbe950..28257f8c5085fd51fbda17861f2de48052546e43 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -265,13 +265,13 @@ bool Bus::RemoveObjectProxyWithOptions(const std::string& service_name,
options);
ObjectProxyTable::iterator iter = object_proxy_table_.find(key);
if (iter != object_proxy_table_.end()) {
+ scoped_refptr<ObjectProxy> object_proxy = iter->second;
+ object_proxy_table_.erase(iter);
// Object is present. Remove it now and Detach in the DBus thread.
GetDBusTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&Bus::RemoveObjectProxyInternal,
- this, iter->second, callback));
-
- object_proxy_table_.erase(iter);
+ this, object_proxy, callback));
return true;
}
return false;
« no previous file with comments | « chromeos/dbus/shill_service_client.cc ('k') | dbus/object_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698