Chromium Code Reviews| 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 |