summaryrefslogtreecommitdiffstats
path: root/dbus/bus.h
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 16:26:30 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 16:26:30 +0000
commite184ccec44f19ae4f3beaef01d5e90753ff924e8 (patch)
tree3859e788740a9641c5fa7f511f8f9a91ecf0b30d /dbus/bus.h
parent18da0fd59dfacb8d00f803103fdbdc556d5d6fe3 (diff)
downloadchromium_src-e184ccec44f19ae4f3beaef01d5e90753ff924e8.zip
chromium_src-e184ccec44f19ae4f3beaef01d5e90753ff924e8.tar.gz
chromium_src-e184ccec44f19ae4f3beaef01d5e90753ff924e8.tar.bz2
Eliminate a timed wait from ExportedObject::HandleMessage().
Previouslly, we blocked in D-Bus thread until the method call is handled in the UI thread. Turned out this was a bad idea, and caused a crash when the UI thread is hanging (crosbug.com/21341). This patch will eliminate the timed wait and incoming methods will be handled completely asynchronously. BUG=chromium-os:21341 TEST=run dbus_unittests under valgrind Review URL: http://codereview.chromium.org/8175009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/bus.h')
-rw-r--r--dbus/bus.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/dbus/bus.h b/dbus/bus.h
index 3d64a08..d8d077d 100644
--- a/dbus/bus.h
+++ b/dbus/bus.h
@@ -383,6 +383,9 @@ class Bus : public base::RefCountedThreadSafe<Bus> {
// AssertOnOriginThread().
virtual void AssertOnDBusThread();
+ // Returns true if the bus is connected to D-Bus.
+ bool is_connected() { return connection_ != NULL; }
+
protected:
// This is protected, so we can define sub classes.
virtual ~Bus();