Loading toolkit/components/remote/nsDBusRemoteClient.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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(). Loading Loading @@ -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"); Loading @@ -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()); Loading toolkit/components/remote/nsDBusRemoteServer.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -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" Loading @@ -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)) { Loading Loading @@ -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 || Loading Loading @@ -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); Loading @@ -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(). Loading Loading
toolkit/components/remote/nsDBusRemoteClient.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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(). Loading Loading @@ -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"); Loading @@ -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()); Loading
toolkit/components/remote/nsDBusRemoteServer.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -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" Loading @@ -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)) { Loading Loading @@ -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 || Loading Loading @@ -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); Loading @@ -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(). Loading