зеркало из https://github.com/mozilla/gecko-dev.git
Bug 849204 - Linux geolocation: Init dbus_threads from the main thread. r=karlt
This commit is contained in:
Родитель
c9f0b3f299
Коммит
f7ddd3e3f1
|
@ -36,10 +36,17 @@
|
|||
#include <X11/Xatom.h>
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
#include <dbus/dbus.h>
|
||||
#endif
|
||||
|
||||
#if (MOZ_PLATFORM_MAEMO == 5)
|
||||
struct DBusMessage; /* libosso.h references internals of dbus */
|
||||
|
||||
#ifndef MOZ_ENABLE_DBUS
|
||||
#include <dbus/dbus.h>
|
||||
#endif
|
||||
|
||||
#include <dbus/dbus-protocol.h>
|
||||
#include <libosso.h>
|
||||
|
||||
|
@ -399,6 +406,13 @@ nsNativeAppSupportUnix::Start(bool *aRetVal)
|
|||
{
|
||||
NS_ASSERTION(gAppData, "gAppData must not be null.");
|
||||
|
||||
// The dbus library is used by both nsWifiScannerDBus and BluetoothDBusService,
|
||||
// from diffrent threads. This could lead to race conditions if the dbus is not
|
||||
// initialized before making any other library calls.
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
dbus_threads_init_default();
|
||||
#endif
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
if (gtk_major_version < MIN_GTK_MAJOR_VERSION ||
|
||||
(gtk_major_version == MIN_GTK_MAJOR_VERSION && gtk_minor_version < MIN_GTK_MINOR_VERSION)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче