The CL: https://codereview.chromium.org/2718583002 added code that sends an event on the readValue callback. So if subscribes to notifications and then calls readValue, will get notified twice. Possible solution is commented at: https://codereview.chromium.org/2718583002/diff/20001/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
fwiw: I think this should land before https://codereview.chromium.org/2718583002. We don't want to knowingly ship bugs.
Makes sense. I'll have a CL that does that.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/50cead395565600cca22d02bf404ea1fc37e3897 commit 50cead395565600cca22d02bf404ea1fc37e3897 Author: juncai <juncai@chromium.org> Date: Thu Mar 09 03:09:50 2017 Fix getting notified twice after subscribe to notifications and call readValue The CL: https://codereview.chromium.org/2718583002 adds code that sends an event on the readValue callback. So if subscribes to notifications and then calls readValue, will get notified twice. This CL fixes this issue. BUG= 697702 Review-Url: https://codereview.chromium.org/2728623004 Cr-Commit-Position: refs/heads/master@{#455652} [modify] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc [modify] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h [modify] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm [modify] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc [modify] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/device/bluetooth/bluetooth_remote_gatt_characteristic_win.cc [modify] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc [modify] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc [modify] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h [modify] https://crrev.com/50cead395565600cca22d02bf404ea1fc37e3897/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.cc
Comment 1 by ortuno@chromium.org
, Mar 2 2017