зеркало из https://github.com/mozilla/gecko-dev.git
Bug 782905 - [b2g-bluetooth] Calling setEnabled(false) twice in a very short period may crash, r=qdot
This commit is contained in:
Родитель
5c56390bd9
Коммит
b2f1558be8
|
@ -40,9 +40,11 @@ public:
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
if (!mEnabled || gInShutdown) {
|
if (!mEnabled || gInShutdown) {
|
||||||
nsCOMPtr<nsIThread> t;
|
if (gBluetoothService->mBluetoothCommandThread) {
|
||||||
gBluetoothService->mBluetoothCommandThread.swap(t);
|
nsCOMPtr<nsIThread> t;
|
||||||
t->Shutdown();
|
gBluetoothService->mBluetoothCommandThread.swap(t);
|
||||||
|
t->Shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gInShutdown) {
|
if (gInShutdown) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче