diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -1700,31 +1700,25 @@ ParseRemoteCommandLine(nsCString& progra return REMOTE_FOUND; } static RemoteResult StartRemoteClient(const char* aDesktopStartupID, nsCString& program, const char* profile, - const char* username, - bool aIsX11Display) + const char* username) { nsAutoPtr client; - if (aIsX11Display) { - client = new XRemoteClient(); - } else { #if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND) - client = new DBusRemoteClient(); + client = new DBusRemoteClient(); #else - MOZ_ASSERT(false, "Missing remote implementation!"); - return REMOTE_NOT_FOUND; + client = new XRemoteClient(); #endif - } nsresult rv = client->Init(); if (NS_FAILED(rv)) return REMOTE_NOT_FOUND; nsCString response; bool success = false; rv = client->SendCommandLine(program.get(), username, profile, @@ -4070,18 +4064,17 @@ XREMain::XRE_mainStartup(bool* aExitFlag NS_WARNING("Cannot lock XRemote start mutex"); } } // Try to remote the entire command line. If this fails, start up normally. const char* desktopStartupIDPtr = mDesktopStartupID.IsEmpty() ? nullptr : mDesktopStartupID.get(); - rr = StartRemoteClient(desktopStartupIDPtr, program, profile, username, - GDK_IS_X11_DISPLAY(mGdkDisplay)); + rr = StartRemoteClient(desktopStartupIDPtr, program, profile, username); if (rr == REMOTE_FOUND) { *aExitFlag = true; return 0; } if (rr == REMOTE_ARG_BAD) { return 1; } }