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

Issue 1465863003: bluetooth: Fix crash when trying to read or write when operation pending (Closed)

Created:
5 years, 1 month ago by ortuno
Modified:
5 years, 1 month ago
Reviewers:
scheib
CC:
chromium-reviews, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@my-origin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Fix crash when trying to read or write when operation pending A return statement was missing so the callback would get called twice. To avoid future bugs in which callbacks are called unexpectedly, we add a new parameter to the getters of the mock callbacks. If Call::EXPECTED is passed then the callback is expected to be called, otherwise we the callback was not expected to be called and the test will fail. We add a TearDown implementation to BluetoothTestBase to check no unexpected calls have been made to callbacks. BUG=557571 Committed: https://crrev.com/8b6bdd4b1492c7a3607f73df02be0da625790afd Cr-Commit-Position: refs/heads/master@{#361040}

Patch Set 1 #

Patch Set 2 : Add override #

Total comments: 6

Patch Set 3 : Address scheib's comments #

Total comments: 4

Patch Set 4 : Address scheib's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -195 lines) Patch
M device/bluetooth/bluetooth_adapter_unittest.cc View 1 2 3 chunks +3 lines, -5 lines 0 comments Download
M device/bluetooth/bluetooth_device_unittest.cc View 1 2 19 chunks +42 lines, -58 lines 0 comments Download
M device/bluetooth/bluetooth_gatt_characteristic_unittest.cc View 1 2 29 chunks +111 lines, -82 lines 0 comments Download
M device/bluetooth/bluetooth_gatt_service_unittest.cc View 4 chunks +10 lines, -10 lines 0 comments Download
M device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M device/bluetooth/test/bluetooth_test.h View 1 2 5 chunks +48 lines, -18 lines 0 comments Download
M device/bluetooth/test/bluetooth_test.cc View 1 2 3 2 chunks +101 lines, -20 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
ortuno
scheib: PTAL
5 years, 1 month ago (2015-11-20 21:01:29 UTC) #2
scheib
https://codereview.chromium.org/1465863003/diff/20001/device/bluetooth/test/bluetooth_test.cc File device/bluetooth/test/bluetooth_test.cc (right): https://codereview.chromium.org/1465863003/diff/20001/device/bluetooth/test/bluetooth_test.cc#newcode51 device/bluetooth/test/bluetooth_test.cc:51: void BluetoothTestBase::TearDown() { Let's also verify that the success ...
5 years, 1 month ago (2015-11-20 23:08:20 UTC) #3
ortuno
scheib: PTAL. Also removed EXPECT_EQ from places where it very obvious they were not needed. ...
5 years, 1 month ago (2015-11-21 01:12:49 UTC) #4
scheib
LGTM https://codereview.chromium.org/1465863003/diff/40001/device/bluetooth/test/bluetooth_test.cc File device/bluetooth/test/bluetooth_test.cc (right): https://codereview.chromium.org/1465863003/diff/40001/device/bluetooth/test/bluetooth_test.cc#newcode87 device/bluetooth/test/bluetooth_test.cc:87: if (expected == Call::NOT_EXPECTED) Optional, but logic for ...
5 years, 1 month ago (2015-11-21 05:40:22 UTC) #5
ortuno
https://codereview.chromium.org/1465863003/diff/40001/device/bluetooth/test/bluetooth_test.cc File device/bluetooth/test/bluetooth_test.cc (right): https://codereview.chromium.org/1465863003/diff/40001/device/bluetooth/test/bluetooth_test.cc#newcode87 device/bluetooth/test/bluetooth_test.cc:87: if (expected == Call::NOT_EXPECTED) On 2015/11/21 at 05:40:22, scheib ...
5 years, 1 month ago (2015-11-22 04:45:02 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1465863003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1465863003/60001
5 years, 1 month ago (2015-11-22 04:45:20 UTC) #9
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-11-22 06:12:58 UTC) #10
commit-bot: I haz the power
5 years, 1 month ago (2015-11-22 06:14:00 UTC) #11
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/8b6bdd4b1492c7a3607f73df02be0da625790afd
Cr-Commit-Position: refs/heads/master@{#361040}

Powered by Google App Engine
This is Rietveld 408576698