From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- toolkit/components/remote/nsDBusRemoteServer.cpp | 10 +++++----- toolkit/components/remote/nsDBusRemoteServer.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'toolkit/components/remote') diff --git a/toolkit/components/remote/nsDBusRemoteServer.cpp b/toolkit/components/remote/nsDBusRemoteServer.cpp index 030d00dc25..48665f367b 100644 --- a/toolkit/components/remote/nsDBusRemoteServer.cpp +++ b/toolkit/components/remote/nsDBusRemoteServer.cpp @@ -37,7 +37,7 @@ static const char* introspect_template = bool nsDBusRemoteServer::HandleOpenURL(const gchar* aInterfaceName, const gchar* aMethodName, - const nsACString& aParam) { + const gchar* aParam) { nsPrintfCString ourInterfaceName("org.mozilla.%s", mAppName.get()); if ((strcmp("OpenURL", aMethodName) != 0) || @@ -50,7 +50,7 @@ bool nsDBusRemoteServer::HandleOpenURL(const gchar* aInterfaceName, if (timestamp == GDK_CURRENT_TIME) { timestamp = guint32(g_get_monotonic_time() / 1000); } - HandleCommandLine(PromiseFlatCString(aParam).get(), timestamp); + HandleCommandLine(aParam, timestamp); return true; } @@ -75,9 +75,9 @@ static void HandleMethodCall(GDBusConnection* aConnection, const gchar* aSender, } gsize len; - const auto* url = (const char*)g_variant_get_fixed_array( + const auto* commandLine = (const char*)g_variant_get_fixed_array( g_variant_get_child_value(aParameters, 0), &len, sizeof(char)); - if (!url) { + if (!commandLine || !len) { g_warning( "nsDBusRemoteServer: HandleMethodCall: failed to get url string!"); g_dbus_method_invocation_return_error( @@ -88,7 +88,7 @@ static void HandleMethodCall(GDBusConnection* aConnection, const gchar* aSender, } int ret = static_cast(aUserData)->HandleOpenURL( - aInterfaceName, aMethodName, nsDependentCString(url, len)); + aInterfaceName, aMethodName, commandLine); if (!ret) { g_dbus_method_invocation_return_error( aInvocation, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, diff --git a/toolkit/components/remote/nsDBusRemoteServer.h b/toolkit/components/remote/nsDBusRemoteServer.h index 4212acb4c3..7f248e3824 100644 --- a/toolkit/components/remote/nsDBusRemoteServer.h +++ b/toolkit/components/remote/nsDBusRemoteServer.h @@ -29,7 +29,7 @@ class nsDBusRemoteServer final : public nsRemoteServer, void OnNameLost(GDBusConnection* aConnection); bool HandleOpenURL(const gchar* aInterfaceName, const gchar* aMethodName, - const nsACString& aParam); + const gchar* aParam); private: uint mDBusID = 0; -- cgit v1.2.3