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

Issue 2680783002: bluetooth: show better error messages for services, characteristics and descriptors (Closed)

Created:
3 years, 10 months ago by perja
Modified:
3 years, 9 months ago
Reviewers:
scheib, ortuno, dcheng
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: show better error messages for services, characteristics and descriptors. The error message now contains the UUID of the respective service, characteristic or descriptor. BUG=619932 Review-Url: https://codereview.chromium.org/2680783002 Cr-Commit-Position: refs/heads/master@{#453590} Committed: https://chromium.googlesource.com/chromium/src/+/b120052928a9adbea3433c206ad659a6197c8600

Patch Set 1 #

Total comments: 4

Patch Set 2 : Use CreateDOMException instead of take(). #

Total comments: 8

Patch Set 3 : Fixed issues and moved error messages from BluetoothRemoteGATTService to BluetoothError. #

Patch Set 4 : Added UUID to DESCRIPTOR_NOT_FOUND, INVALID_DESCRIPTOR and INVALID_CHARACTERISTIC. #

Total comments: 1

Patch Set 5 : Rebased on master. #

Patch Set 6 : Removed unused error and moved some codes to BluetoothError. #

Patch Set 7 : Split out the error codes that requires separate error message. #

Patch Set 8 : Rebased on master. #

Total comments: 4

Patch Set 9 : Rebased on master. #

Patch Set 10 : Added comment and changed to enum class. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -164 lines) Patch
M third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptor/descriptor-not-found.html View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/script-tests/server/device-disconnects-invalidates-objects.js View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/script-tests/server/disconnect-invalidates-objects.js View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/script-tests/service/device-disconnects-invalidates-objects.js View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/script-tests/service/disconnect-invalidates-objects.js View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/delayed-discovery-service-not-found.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-device-disconnects-invalidates-objects.html View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/gen-disconnect-invalidates-objects.html View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryService/service-not-found.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/delayed-discovery-service-with-uuid-not-found.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/gen-device-disconnects-invalidates-objects.html View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/gen-device-disconnects-invalidates-objects-with-uuid.html View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects.html View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects-with-uuid.html View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/server/getPrimaryServices/services-not-found-with-uuid.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/service/getCharacteristic/characteristic-not-found.html View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/service/getCharacteristic/gen-device-disconnects-invalidates-objects.html View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/service/getCharacteristic/gen-disconnect-invalidates-objects.html View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/service/getCharacteristics/characteristics-not-found-with-uuid.html View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/service/getCharacteristics/gen-device-disconnects-invalidates-objects.html View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/service/getCharacteristics/gen-device-disconnects-invalidates-objects-with-uuid.html View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/service/getCharacteristics/gen-disconnect-invalidates-objects.html View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/service/getCharacteristics/gen-disconnect-invalidates-objects-with-uuid.html View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothError.h View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +42 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp View 1 2 3 4 5 6 15 chunks +49 lines, -41 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.cpp View 1 2 3 4 5 7 chunks +20 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp View 1 2 3 4 5 6 8 4 chunks +12 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp View 1 2 3 4 5 6 8 6 chunks +22 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.h View 1 2 2 chunks +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.cpp View 1 1 chunk +0 lines, -31 lines 0 comments Download
M third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 52 (26 generated)
perja
@scheib: PTAL.
3 years, 10 months ago (2017-02-07 15:01:59 UTC) #6
scheib
Thanks, please expand this to descriptors as well, now that they've landed.
3 years, 10 months ago (2017-02-07 18:36:28 UTC) #7
ortuno
https://codereview.chromium.org/2680783002/diff/1/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h File third_party/WebKit/Source/modules/bluetooth/BluetoothError.h (right): https://codereview.chromium.org/2680783002/diff/1/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h#newcode27 third_party/WebKit/Source/modules/bluetooth/BluetoothError.h:27: static DOMException* take( I don't think it makes sense ...
3 years, 10 months ago (2017-02-07 21:54:46 UTC) #9
perja
On 2017/02/07 18:36:28, scheib wrote: > Thanks, please expand this to descriptors as well, now ...
3 years, 10 months ago (2017-02-08 15:01:47 UTC) #10
perja
https://codereview.chromium.org/2680783002/diff/1/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h File third_party/WebKit/Source/modules/bluetooth/BluetoothError.h (right): https://codereview.chromium.org/2680783002/diff/1/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h#newcode27 third_party/WebKit/Source/modules/bluetooth/BluetoothError.h:27: static DOMException* take( On 2017/02/07 21:54:46, ortuno wrote: > ...
3 years, 10 months ago (2017-02-08 15:05:47 UTC) #11
scheib
On 2017/02/08 15:01:47, perja wrote: > On 2017/02/07 18:36:28, scheib wrote: > > Thanks, please ...
3 years, 10 months ago (2017-02-08 18:58:04 UTC) #16
dougt
On 2017/02/08 18:58:04, scheib wrote: > On 2017/02/08 15:01:47, perja wrote: > > On 2017/02/07 ...
3 years, 10 months ago (2017-02-09 04:00:50 UTC) #17
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/2680783002/20001
3 years, 10 months ago (2017-02-09 10:02:03 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/360415)
3 years, 10 months ago (2017-02-09 10:09:03 UTC) #21
perja
dcheng: SECURITY_OWNERS review for the changes in web_bluetooth.mojom.
3 years, 10 months ago (2017-02-09 10:26:00 UTC) #23
dcheng
https://codereview.chromium.org/2680783002/diff/20001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp File third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp (right): https://codereview.chromium.org/2680783002/diff/20001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp#newcode25 third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp:25: return DOMException::create(name, detailedMessage); \ FWIW, I'm not an owner ...
3 years, 10 months ago (2017-02-09 19:16:42 UTC) #24
perja
dcheng: thanks, PTAL again. https://codereview.chromium.org/2680783002/diff/20001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp File third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp (right): https://codereview.chromium.org/2680783002/diff/20001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp#newcode25 third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp:25: return DOMException::create(name, detailedMessage); \ On ...
3 years, 10 months ago (2017-02-10 13:28:16 UTC) #25
scheib
https://codereview.chromium.org/2680783002/diff/60001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp File third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp (right): https://codereview.chromium.org/2680783002/diff/60001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp#newcode66 third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp:66: MAP_ERROR(INVALID_SERVICE, InvalidStateError, On 2017/02/10 13:28:16, perja wrote: > On ...
3 years, 10 months ago (2017-02-10 18:25:34 UTC) #31
perja
> I suggest we split the mojom enum WebBluetoothResult into two: > enum WebBluetoothResult > ...
3 years, 10 months ago (2017-02-20 15:51:38 UTC) #32
ortuno
On 2017/02/20 at 15:51:38, perja wrote: > > I suggest we split the mojom enum ...
3 years, 10 months ago (2017-02-20 21:01:23 UTC) #33
perja
On 2017/02/20 21:01:23, ortuno wrote: > On 2017/02/20 at 15:51:38, perja wrote: > > > ...
3 years, 10 months ago (2017-02-21 15:54:36 UTC) #34
ortuno
On 2017/02/21 at 15:54:36, perja wrote: > On 2017/02/20 21:01:23, ortuno wrote: > > On ...
3 years, 10 months ago (2017-02-21 21:33:16 UTC) #35
perja
On 2017/02/21 21:33:16, ortuno wrote: > On 2017/02/21 at 15:54:36, perja wrote: > > On ...
3 years, 10 months ago (2017-02-22 15:32:46 UTC) #36
dcheng
(Is this ready for re-review?)
3 years, 10 months ago (2017-02-22 18:09:06 UTC) #39
perja
On 2017/02/22 18:09:06, dcheng wrote: > (Is this ready for re-review?) Yes, PTAK again.
3 years, 10 months ago (2017-02-22 21:10:23 UTC) #42
perja
@scheib: PTAL again. I couldn't find a way to easily split the enum in web_bluetooth.mojo ...
3 years, 10 months ago (2017-02-24 09:53:37 UTC) #43
scheib
Sorry for the difficulty in trying to split the mojom enum, thanks for seeing through ...
3 years, 9 months ago (2017-02-27 17:57:14 UTC) #44
dcheng
mojo lgtm https://codereview.chromium.org/2680783002/diff/140001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h File third_party/WebKit/Source/modules/bluetooth/BluetoothError.h (right): https://codereview.chromium.org/2680783002/diff/140001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h#newcode15 third_party/WebKit/Source/modules/bluetooth/BluetoothError.h:15: enum BluetoothErrorCode { enum class or nest ...
3 years, 9 months ago (2017-02-28 05:09:51 UTC) #45
perja
https://codereview.chromium.org/2680783002/diff/140001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp File third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp (right): https://codereview.chromium.org/2680783002/diff/140001/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp#newcode38 third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp:38: NOTREACHED(); On 2017/02/27 17:57:14, scheib wrote: > Please add ...
3 years, 9 months ago (2017-02-28 11:45:19 UTC) #46
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/2680783002/180001
3 years, 9 months ago (2017-02-28 11:45:45 UTC) #49
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 13:50:14 UTC) #52
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/b120052928a9adbea3433c206ad6...

Powered by Google App Engine
This is Rietveld 408576698