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

Issue 2478013002: bluetooth: Invalidate services upon disconnection (Closed)

Created:
4 years, 1 month ago by ortuno
Modified:
4 years, 1 month ago
Reviewers:
scheib
CC:
blink-reviews, chromium-reviews, haraken, ortuno+watch_chromium.org, scheib+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Invalidate services upon disconnection Remove services from attribute instance map when a device disconnects or when disconnect is called. Check that the service is in the attribute instance map and reject if it isn't. Small refactor of disconnect() and dispatchGattServerDisconnected() to more closely match the spec. BUG=654950 Committed: https://crrev.com/344468c89036d7eff858c39c7fbb0e360f0ea71e Cr-Commit-Position: refs/heads/master@{#430206}

Patch Set 1 #

Patch Set 2 : Clean up #

Total comments: 1

Patch Set 3 : Clean up #

Total comments: 4

Patch Set 4 : Address scheib's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+629 lines, -16 lines) Patch
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/gen-service-device-disconnects-invalidates-objects.html View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/gen-service-disconnect-invalidates-objects.html View 1 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/gen-service-get-different-service-after-reconnection.html View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-device-disconnects-invalidates-objects.html View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-device-disconnects-invalidates-objects-with-uuid.html View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-disconnect-invalidates-objects.html View 1 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-disconnect-invalidates-objects-with-uuid.html View 1 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-get-different-service-after-reconnection.html View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/gen-service-get-different-service-after-reconnection-with-uuid.html View 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/script-tests/service-device-disconnects-invalidates-objects.js View 1 2 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/script-tests/service-disconnect-invalidates-objects.js View 1 1 chunk +45 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/script-tests/service-get-different-service-after-reconnection.js View 1 chunk +37 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.h View 1 chunk +12 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothAttributeInstanceMap.cpp View 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h View 1 2 3 2 chunks +10 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp View 1 2 3 3 chunks +16 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp View 2 chunks +8 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 22 (13 generated)
ortuno
scheib: PTAL https://codereview.chromium.org/2478013002/diff/20001/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp File third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp (right): https://codereview.chromium.org/2478013002/diff/20001/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp#newcode103 third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp:103: device()->CleanupDisconnectedDeviceAndFireEvent(); Note how we only clear the ...
4 years, 1 month ago (2016-11-04 03:09:48 UTC) #5
scheib
LGTM https://codereview.chromium.org/2478013002/diff/40001/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp File third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp (right): https://codereview.chromium.org/2478013002/diff/40001/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp#newcode72 third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp:72: m_gatt->setConnected(false); Here can we either if (connected), or ...
4 years, 1 month ago (2016-11-04 22:53:51 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2478013002/60001
4 years, 1 month ago (2016-11-06 22:43:36 UTC) #11
ortuno
Thanks! https://codereview.chromium.org/2478013002/diff/40001/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp File third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp (right): https://codereview.chromium.org/2478013002/diff/40001/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp#newcode72 third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp:72: m_gatt->setConnected(false); On 2016/11/04 at 22:53:50, scheib wrote: > ...
4 years, 1 month ago (2016-11-06 22:44:12 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/175307)
4 years, 1 month ago (2016-11-06 23:55:51 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2478013002/60001
4 years, 1 month ago (2016-11-07 00:01:46 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2478013002/60001
4 years, 1 month ago (2016-11-07 00:36:45 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-07 01:17:50 UTC) #20
commit-bot: I haz the power
4 years, 1 month ago (2016-11-07 01:20:38 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/344468c89036d7eff858c39c7fbb0e360f0ea71e
Cr-Commit-Position: refs/heads/master@{#430206}

Powered by Google App Engine
This is Rietveld 408576698