зеркало из https://github.com/mozilla/gecko-dev.git
Bug 756389 - B2G Bluetooth: unexpected crash in DBusThread::StopEventLoop; r=cjones
This commit is contained in:
Родитель
421f8ec45d
Коммит
6f1c8ccf33
|
@ -211,14 +211,23 @@ SystemWorkerManager::Init()
|
|||
}
|
||||
|
||||
nsresult rv = InitRIL(cx);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to initialize RIL/Telephony!");
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = InitWifi(cx);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to initialize WiFi Networking!");
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G_BT
|
||||
rv = InitBluetooth(cx);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to initialize Bluetooth!");
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs =
|
||||
|
@ -229,7 +238,10 @@ SystemWorkerManager::Init()
|
|||
}
|
||||
|
||||
rv = obs->AddObserver(this, WORKERS_SHUTDOWN_TOPIC, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to initialize worker shutdown event!");
|
||||
return rv;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -531,8 +531,10 @@ DBusThread::IsEventLoopRunning()
|
|||
static void
|
||||
ConnectDBus(Monitor* aMonitor, bool* aSuccess)
|
||||
{
|
||||
MOZ_ASSERT(!sDBusThread);
|
||||
|
||||
if(sDBusThread) {
|
||||
NS_WARNING("Trying to start DBus Thread that is already currently running, skipping.");
|
||||
return;
|
||||
}
|
||||
sDBusThread = new DBusThread();
|
||||
*aSuccess = true;
|
||||
if(!sDBusThread->StartEventLoop())
|
||||
|
@ -548,8 +550,10 @@ ConnectDBus(Monitor* aMonitor, bool* aSuccess)
|
|||
static void
|
||||
DisconnectDBus(Monitor* aMonitor, bool* aSuccess)
|
||||
{
|
||||
MOZ_ASSERT(sDBusThread);
|
||||
|
||||
if(!sDBusThread) {
|
||||
NS_WARNING("Trying to shutdown DBus Thread that is not currently running, skipping.");
|
||||
return;
|
||||
}
|
||||
*aSuccess = true;
|
||||
sDBusThread->StopEventLoop();
|
||||
sDBusThread = NULL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче