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

Unified Diff: dbus/object_proxy.cc

Issue 23143004: dbus: Suppress NameHasNoOwner errors when connecting to signals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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: dbus/object_proxy.cc
diff --git a/dbus/object_proxy.cc b/dbus/object_proxy.cc
index 95aab8956d43ff22178874ad6a60bbcf87efc097..ea76fd72f091f9393d647e7da5f6ebfe85468a1f 100644
--- a/dbus/object_proxy.cc
+++ b/dbus/object_proxy.cc
@@ -612,8 +612,12 @@ bool ObjectProxy::AddMatchRuleWithoutCallback(
void ObjectProxy::UpdateNameOwnerAndBlock() {
bus_->AssertOnDBusThread();
+ // Errors should be suppressed here, as the service may not be yet running
+ // when connecting to signals of the service, which is just fine.
+ // The ObjectProxy will be notified when the service is launched via
+ // NameOwnerChanged signal. See also comments in ConnectToSignalInternal().
service_name_owner_ =
- bus_->GetServiceOwnerAndBlock(service_name_, Bus::REPORT_ERRORS);
+ bus_->GetServiceOwnerAndBlock(service_name_, Bus::SUPPRESS_ERRORS);
}
DBusHandlerResult ObjectProxy::HandleNameOwnerChanged(
« 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