Bug 1415078 - Use DBus remote exclusively on MOZ_WAYLAND builds, r=jhorak

Differential Revision: https://phabricator.services.mozilla.com/D6899

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Martin Stransky 2018-10-01 08:17:04 +00:00
Родитель 61c7fc41f4
Коммит 4e05ab8ff2
2 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -34,20 +34,18 @@ NS_IMPL_ISUPPORTS(nsRemoteService,
NS_IMETHODIMP
nsRemoteService::Startup(const char* aAppName, const char* aProfileName)
{
#if defined(MOZ_ENABLE_DBUS)
#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND)
nsresult rv;
mDBusRemoteService = new nsDBusRemoteService();
rv = mDBusRemoteService->Startup(aAppName, aProfileName);
if (NS_FAILED(rv)) {
mDBusRemoteService = nullptr;
}
#elif !defined(MOZ_WAYLAND)
mGtkRemoteService = new nsGTKRemoteService();
mGtkRemoteService->Startup(aAppName, aProfileName);
#endif
if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
mGtkRemoteService = new nsGTKRemoteService();
mGtkRemoteService->Startup(aAppName, aProfileName);
}
if (!mDBusRemoteService && !mGtkRemoteService)
return NS_ERROR_FAILURE;
@ -73,7 +71,7 @@ nsRemoteService::RegisterWindow(mozIDOMWindow* aWindow)
NS_IMETHODIMP
nsRemoteService::Shutdown()
{
#if defined(MOZ_ENABLE_DBUS)
#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND)
if (mDBusRemoteService) {
mDBusRemoteService->Shutdown();
mDBusRemoteService = nullptr;

Просмотреть файл

@ -11,7 +11,6 @@ FINAL_LIBRARY = 'xul'
SOURCES += [
'RemoteUtils.cpp',
'XRemoteClient.cpp',
]
if CONFIG['MOZ_ENABLE_DBUS'] and CONFIG['MOZ_WAYLAND']:
@ -20,3 +19,7 @@ if CONFIG['MOZ_ENABLE_DBUS'] and CONFIG['MOZ_WAYLAND']:
]
CXXFLAGS += CONFIG['TK_CFLAGS']
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
else:
SOURCES += [
'XRemoteClient.cpp',
]