| 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 a9664712bfb5063a6b2dfd0361d52024e9ee55cf..37289c99a1c8ff96f8ee369757a55ecbb3eba554 100644
|
| --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp
|
| +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp
|
| @@ -162,14 +162,19 @@ class GetPrimaryServicesCallback
|
| m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| return;
|
|
|
| - m_device->gatt()->RemoveFromActiveAlgorithms(m_resolver.get());
|
| + if (!m_device->gatt()->RemoveFromActiveAlgorithms(m_resolver.get())) {
|
| + m_resolver->reject(
|
| + DOMException::create(NetworkError, kGATTServerDisconnected));
|
| + return;
|
| + }
|
| +
|
| m_resolver->reject(BluetoothError::take(m_resolver, error));
|
| }
|
|
|
| private:
|
| Persistent<BluetoothDevice> m_device;
|
| mojom::blink::WebBluetoothGATTQueryQuantity m_quantity;
|
| - Persistent<ScriptPromiseResolver> m_resolver;
|
| + const Persistent<ScriptPromiseResolver> m_resolver;
|
| };
|
|
|
| ScriptPromise BluetoothRemoteGATTServer::getPrimaryService(
|
|
|