summaryrefslogtreecommitdiffstats
path: root/dbus/exported_object.h
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-13 00:45:26 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-13 00:45:26 +0000
commit6477a41b085ee5e470a0862848281f5009e5cb9f (patch)
tree5ece0468bd892176667d30833a2503e449517f98 /dbus/exported_object.h
parent66212d0735400e240ac4fc371b57637138754944 (diff)
downloadchromium_src-6477a41b085ee5e470a0862848281f5009e5cb9f.zip
chromium_src-6477a41b085ee5e470a0862848281f5009e5cb9f.tar.gz
chromium_src-6477a41b085ee5e470a0862848281f5009e5cb9f.tar.bz2
Make ExportedObject and ObjectProxy own Bus as scoped_refptr.
They should own Bus as scoped_refptr, rather than raw pointer. Otherwise, they may reference |bus_| after Bus is deleted. I know this is convoluted. I'm planning to minimize use of scoped_refptr from dbus/* but this change is necessary until then. TEST=run dbus_unittest under valgrind and confirm no memory leaks BUG=chromium-os:21379 Review URL: http://codereview.chromium.org/8201023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/exported_object.h')
-rw-r--r--dbus/exported_object.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbus/exported_object.h b/dbus/exported_object.h
index 24456f7..7dd8ca5 100644
--- a/dbus/exported_object.h
+++ b/dbus/exported_object.h
@@ -144,7 +144,7 @@ class ExportedObject : public base::RefCountedThreadSafe<ExportedObject> {
static void OnUnregisteredThunk(DBusConnection* connection,
void* user_data);
- Bus* bus_;
+ scoped_refptr<Bus> bus_;
std::string service_name_;
std::string object_path_;
bool object_is_registered_;