summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-16 09:16:42 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-16 09:16:42 +0000
commitd491b7344458aeab36d76a8f5207e9a4182d1344 (patch)
treed5f99c4dad4c55c4ca2015e1d71d8d4de2a59fee /dbus
parentedfca70c96fda567e60ab76c19016030a5746e7f (diff)
downloadchromium_src-d491b7344458aeab36d76a8f5207e9a4182d1344.zip
chromium_src-d491b7344458aeab36d76a8f5207e9a4182d1344.tar.gz
chromium_src-d491b7344458aeab36d76a8f5207e9a4182d1344.tar.bz2
dbus: Suppress NameHasNoOwner errors when connecting to signals
The NameHasNoOwner errors are emitted as Chrome tries to get the identity of the service when connecting to signals for sender verification (crbug.com/140938), but the service may not yet be running, which is all right, hence the NameHasNoOwner errors here should be just supressed. BUG=273829 TEST=out/Debug/dbus_unittests --gtest_filter=SignalSenderVerificationTest.TestSignalAccepted; confirm that NameHasNoOwner is no longre emitted. Previously, an error message like below was emited: [12721:12722:0816/144031:3991948732792:ERROR:bus.cc(892)] Failed to get name owner. Got org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.chromium.TestService': no such name Review URL: https://chromiumcodereview.appspot.com/23143004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217980 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus')
-rw-r--r--dbus/object_proxy.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/dbus/object_proxy.cc b/dbus/object_proxy.cc
index 95aab89..ea76fd7 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(