зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1241117 - Fix mAppUuid access before assign in BluetoothGatt::Connect. r=joliu
This commit is contained in:
Родитель
9c134bf2d5
Коммит
525d63acc9
|
@ -112,11 +112,6 @@ BluetoothGatt::Connect(ErrorResult& aRv)
|
|||
BluetoothService* bs = BluetoothService::Get();
|
||||
BT_ENSURE_TRUE_REJECT(bs, promise, NS_ERROR_NOT_AVAILABLE);
|
||||
|
||||
BluetoothUuid appUuid;
|
||||
BT_ENSURE_TRUE_REJECT(NS_SUCCEEDED(StringToUuid(mAppUuid, appUuid)),
|
||||
promise,
|
||||
NS_ERROR_DOM_OPERATION_ERR);
|
||||
|
||||
BluetoothAddress deviceAddr;
|
||||
BT_ENSURE_TRUE_REJECT(
|
||||
NS_SUCCEEDED(StringToAddress(mDeviceAddr, deviceAddr)),
|
||||
|
@ -131,6 +126,11 @@ BluetoothGatt::Connect(ErrorResult& aRv)
|
|||
RegisterBluetoothSignalHandler(mAppUuid, this);
|
||||
}
|
||||
|
||||
BluetoothUuid appUuid;
|
||||
BT_ENSURE_TRUE_REJECT(NS_SUCCEEDED(StringToUuid(mAppUuid, appUuid)),
|
||||
promise,
|
||||
NS_ERROR_DOM_OPERATION_ERR);
|
||||
|
||||
UpdateConnectionState(BluetoothConnectionState::Connecting);
|
||||
bs->ConnectGattClientInternal(
|
||||
appUuid, deviceAddr, new BluetoothVoidReplyRunnable(nullptr, promise));
|
||||
|
|
Загрузка…
Ссылка в новой задаче