Pier Angelo Vendrame pushed to branch tor-browser-147.0a1-16.0-2 at The Tor Project / Applications / Tor Browser Commits: 1d7f3225 by Pier Angelo Vendrame at 2026-02-05T14:41:51+00:00 fixup! TB 2176: Rebrand Firefox to TorBrowser BB 44050: Use org.torproject rather than org.mozilla for D-bus. - - - - - 2 changed files: - toolkit/components/remote/nsDBusRemoteClient.cpp - toolkit/components/remote/nsDBusRemoteServer.cpp Changes: ===================================== toolkit/components/remote/nsDBusRemoteClient.cpp ===================================== @@ -77,7 +77,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram, mozilla::XREAppData::SanitizeNameForDBus(profileName); aDestinationName = - nsPrintfCString("org.mozilla.%s.%s", aProgram, profileName.get()); + nsPrintfCString("org.torproject.%s.%s", aProgram, profileName.get()); if (aDestinationName.Length() > DBUS_MAXIMUM_NAME_LENGTH) aDestinationName.Truncate(DBUS_MAXIMUM_NAME_LENGTH); @@ -91,7 +91,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram, if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) { // We don't have a valid busName yet - try to create a default one. aDestinationName = - nsPrintfCString("org.mozilla.%s.%s", aProgram, "default"); + nsPrintfCString("org.torproject.%s.%s", aProgram, "default"); if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) { // We failed completelly to get a valid bus name - just quit // to prevent crash at dbus_bus_request_name(). @@ -122,7 +122,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile, } nsAutoCString pathName; - pathName = nsPrintfCString("/org/mozilla/%s/Remote", appName.get()); + pathName = nsPrintfCString("/org/torproject/%s/Remote", appName.get()); static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym( RTLD_DEFAULT, "dbus_validate_path"); @@ -133,7 +133,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile, } nsAutoCString remoteInterfaceName; - remoteInterfaceName = nsPrintfCString("org.mozilla.%s", appName.get()); + remoteInterfaceName = nsPrintfCString("org.torproject.%s", appName.get()); LOG(" DBus destination: %s\n", destinationName.get()); LOG(" DBus path: %s\n", pathName.get()); ===================================== toolkit/components/remote/nsDBusRemoteServer.cpp ===================================== @@ -28,7 +28,7 @@ static const char* introspect_template = "1.0//EN\"\n" "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n" "<node>\n" - " <interface name=\"org.mozilla.%s\">\n" + " <interface name=\"org.torproject.%s\">\n" " <method name=\"OpenURL\">\n" " <arg name=\"url\" direction=\"in\" type=\"ay\"/>\n" " </method>\n" @@ -38,7 +38,7 @@ static const char* introspect_template = bool nsDBusRemoteServer::HandleOpenURL(const gchar* aInterfaceName, const gchar* aMethodName, Span<const gchar> aParam) { - nsPrintfCString ourInterfaceName("org.mozilla.%s", mAppName.get()); + nsPrintfCString ourInterfaceName("org.torproject.%s", mAppName.get()); if ((strcmp("OpenURL", aMethodName) != 0) || (strcmp(ourInterfaceName.get(), aInterfaceName) != 0)) { @@ -131,7 +131,7 @@ static const GDBusInterfaceVTable gInterfaceVTable = { HandleMethodCall, HandleGetProperty, HandleSetProperty}; void nsDBusRemoteServer::OnBusAcquired(GDBusConnection* aConnection) { - mPathName = nsPrintfCString("/org/mozilla/%s/Remote", mAppName.get()); + mPathName = nsPrintfCString("/org/torproject/%s/Remote", mAppName.get()); static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym( RTLD_DEFAULT, "dbus_validate_path"); if (!sDBusValidatePathName || @@ -205,7 +205,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName, mozilla::XREAppData::SanitizeNameForDBus(profileName); - nsPrintfCString busName("org.mozilla.%s.%s", mAppName.get(), + nsPrintfCString busName("org.torproject.%s.%s", mAppName.get(), profileName.get()); if (busName.Length() > DBUS_MAXIMUM_NAME_LENGTH) { busName.Truncate(DBUS_MAXIMUM_NAME_LENGTH); @@ -220,7 +220,8 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName, // We don't have a valid busName yet - try to create a default one. if (!sDBusValidateBusName(busName.get(), nullptr)) { - busName = nsPrintfCString("org.mozilla.%s.%s", mAppName.get(), "default"); + busName = + nsPrintfCString("org.torproject.%s.%s", mAppName.get(), "default"); if (!sDBusValidateBusName(busName.get(), nullptr)) { // We failed completelly to get a valid bus name - just quit // to prevent crash at dbus_bus_request_name(). View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1d7f3225... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1d7f3225... You're receiving this email because of your account on gitlab.torproject.org.