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

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

Issue 2478013002: bluetooth: Invalidate services upon disconnection (Closed)
Patch Set: Clean up Created 4 years, 1 month 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/BluetoothRemoteGATTServer.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp
index 7a33a680bbad9d60282e39caf24f9d47843d3a0e..510229d924a1f89f543087b9f76a28323e9b6ecb 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp
@@ -100,13 +100,10 @@ ScriptPromise BluetoothRemoteGATTServer::connect(ScriptState* scriptState) {
void BluetoothRemoteGATTServer::disconnect(ScriptState* scriptState) {
if (!m_connected)
return;
- m_connected = false;
- ClearActiveAlgorithms();
+ device()->CleanupDisconnectedDeviceAndFireEvent();
ortuno 2016/11/04 03:09:48 Note how we only clear the active algorithms map o
WebBluetooth* webbluetooth =
BluetoothSupplement::fromScriptState(scriptState);
webbluetooth->disconnect(device()->id());
- device()->dispatchEvent(
- Event::createBubble(EventTypeNames::gattserverdisconnected));
}
// Class that allows us to resolve the promise with a single service or

Powered by Google App Engine
This is Rietveld 408576698