Bug 1266033: |nsDBusHandlerApp|: Use private connection to DBus session bus, r=bz
authorThomas Zimmermann <tdz@users.sourceforge.net>
Thu, 21 Apr 2016 11:24:23 +0200
changeset 294208 8b76cbb69bef628b93c165c78a55c361ad3e5109
parent 294207 2eff1cd6a1fe3e75a76affa174444ae59864c16f
child 294209 6440d8e37e674be45d514d79aeabeac462b4ad19
push id75462
push usertdz@users.sourceforge.net
push dateThu, 21 Apr 2016 09:24:57 +0000
treeherdermozilla-inbound@8b76cbb69bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1266033
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1266033: |nsDBusHandlerApp|: Use private connection to DBus session bus, r=bz Sharing DBus connections can interfere with other modules (e.g., watching connections on multiple threads concurrently might introduce race conditions). This patch changes |nsDBusHandlerApp| to use it's private connection to the session bus to avoid interference.
uriloader/exthandler/nsDBusHandlerApp.cpp
--- a/uriloader/exthandler/nsDBusHandlerApp.cpp
+++ b/uriloader/exthandler/nsDBusHandlerApp.cpp
@@ -84,17 +84,17 @@ nsDBusHandlerApp::LaunchWithURI(nsIURI *
   nsresult rv = aURI->GetAsciiSpec(spec);
   NS_ENSURE_SUCCESS(rv,rv);
   const char* uri = spec.get();
 
   DBusError err;
   dbus_error_init(&err);
 
   RefPtr<DBusConnection> connection = already_AddRefed<DBusConnection>(
-    dbus_bus_get(DBUS_BUS_SESSION, &err));
+    dbus_bus_get_private(DBUS_BUS_SESSION, &err));
 
   if (dbus_error_is_set(&err)) {
     dbus_error_free(&err);
     return NS_ERROR_FAILURE;
   }
   if (nullptr == connection) {
     return NS_ERROR_FAILURE;
   }