Bug 862462 - Make sure BluetoothAdapter unroots before destruction; r=mrbkap

This commit is contained in:
Kyle Machulis 2013-04-16 14:54:00 -07:00
parent 45a9125134
commit d9f2985869

View File

@ -168,11 +168,11 @@ BluetoothAdapter::BluetoothAdapter(nsPIDOMWindow* aWindow,
BluetoothAdapter::~BluetoothAdapter()
{
Unroot();
BluetoothService* bs = BluetoothService::Get();
// We can be null on shutdown, where this might happen
NS_ENSURE_TRUE_VOID(bs);
bs->UnregisterBluetoothSignalHandler(NS_LITERAL_STRING(KEY_ADAPTER), this);
Unroot();
}
void