Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp

Issue 2648583004: bluetooth: Stop firing value changed events after gatt disconnects (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
index 89a1ea228b9310bb9b7cfa6293570c69c9dac058..84b788eb624477537b71c155959ed2a5e14e50b3 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
@@ -51,6 +51,8 @@ void BluetoothRemoteGATTCharacteristic::setValue(DOMDataView* domDataView) {
void BluetoothRemoteGATTCharacteristic::dispatchCharacteristicValueChanged(
const Vector<uint8_t>& value) {
+ if (!getGatt()->connected())
Jeffrey Yasskin 2017/01/20 21:29:41 Did/could you double-check that we don't have any
ortuno 2017/01/24 02:38:25 So there are 7 instances of checking for connected
+ return;
this->setValue(BluetoothRemoteGATTUtils::ConvertWTFVectorToDataView(value));
dispatchEvent(Event::create(EventTypeNames::characteristicvaluechanged));
}

Powered by Google App Engine
This is Rietveld 408576698