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

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

Issue 2648583004: bluetooth: Stop firing value changed events after gatt disconnects (Closed)
Patch Set: Make iframe subscribe to notifications and add comments. 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
« no previous file with comments | « third_party/WebKit/LayoutTests/resources/bluetooth/heart-rate-iframe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
+ return;
this->setValue(BluetoothRemoteGATTUtils::ConvertWTFVectorToDataView(value));
dispatchEvent(Event::create(EventTypeNames::characteristicvaluechanged));
}
« no previous file with comments | « third_party/WebKit/LayoutTests/resources/bluetooth/heart-rate-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698