|
|
Chromium Code Reviews
DescriptionAdding log in BluetoothAdapterMac::CreateGattConnection() and BluetoothAdapterMac::DisconnectGatt()
And removing from BluetoothLowEnergyDeviceMac::CreateGattConnectionImpl() and BluetoothLowEnergyDeviceMac::DisconnectGatt()
This is to make sure no log are missed (when calling directly BluetoothAdapterMac).
BUG=685972
Review-Url: https://codereview.chromium.org/2783283002
Cr-Commit-Position: refs/heads/master@{#461079}
Committed: https://chromium.googlesource.com/chromium/src/+/bf7b01a5ecefb707c69f90baa0850d5d7570215a
Patch Set 1 #
Total comments: 3
Patch Set 2 : Removing DCHECK #
Messages
Total messages: 25 (17 generated)
Patchset #1 (id:1) has been deleted
Patchset #1 (id:20001) has been deleted
Description was changed from ========== Adding log in BluetoothAdapterMac::DisconnectGatt() BUG= ========== to ========== Adding log in BluetoothAdapterMac::CreateGattConnection() and BluetoothAdapterMac::DisconnectGatt() And removing from BluetoothLowEnergyDeviceMac::CreateGattConnectionImpl() and BluetoothLowEnergyDeviceMac::DisconnectGatt() This is to make sure no log are missed (when calling directly BluetoothAdapterMac). BUG=685972 ==========
jlebel@chromium.org changed reviewers: + scheib@chromium.org
Hello Vincent, Can you review this small patch about improving logs for bluetooth low energy for macOS? Thanks,
The CQ bit was checked by jlebel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
Patchset #1 (id:40001) has been deleted
The CQ bit was checked by jlebel@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm, with suggested small fix: https://codereview.chromium.org/2783283002/diff/60001/device/bluetooth/blueto... File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2783283002/diff/60001/device/bluetooth/blueto... device/bluetooth/bluetooth_adapter_mac.mm:644: DCHECK(device_mac); This DCHECK is redundant with the "*device_mac" isn't it? If device_mac is null then a crash will occur and the stack should be produced blaming that line, it should be easy to understand. -- If I'm wrong, by all means use a DCHECK to make it clear.
Let me know if you prefer me to remove the DCHECK. https://codereview.chromium.org/2783283002/diff/60001/device/bluetooth/blueto... File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2783283002/diff/60001/device/bluetooth/blueto... device/bluetooth/bluetooth_adapter_mac.mm:644: DCHECK(device_mac); On 2017/03/30 22:48:41, scheib wrote: > This DCHECK is redundant with the "*device_mac" isn't it? If device_mac is null > then a crash will occur and the stack should be produced blaming that line, it > should be easy to understand. -- If I'm wrong, by all means use a DCHECK to make > it clear. It will crash, but somewhere in operator<< related to BluetoothLowEnergyDeviceMac. My idea was to make it very clear. There is also one difference, null will be caught by the DCHECK, a deallocated device will crash in the operator<<. Do you think I should remove the DCHECK?
On 2017/03/30 23:16:08, jlebel wrote: > Let me know if you prefer me to remove the DCHECK. > > https://codereview.chromium.org/2783283002/diff/60001/device/bluetooth/blueto... > File device/bluetooth/bluetooth_adapter_mac.mm (right): > > https://codereview.chromium.org/2783283002/diff/60001/device/bluetooth/blueto... > device/bluetooth/bluetooth_adapter_mac.mm:644: DCHECK(device_mac); > On 2017/03/30 22:48:41, scheib wrote: > > This DCHECK is redundant with the "*device_mac" isn't it? If device_mac is > null > > then a crash will occur and the stack should be produced blaming that line, it > > should be easy to understand. -- If I'm wrong, by all means use a DCHECK to > make > > it clear. > > It will crash, but somewhere in operator<< related to > BluetoothLowEnergyDeviceMac. My idea was to make it very clear. There is also > one difference, null will be caught by the DCHECK, a deallocated device will > crash in the operator<<. > > Do you think I should remove the DCHECK? I'd remove it myself. IMHO that is straight forward enough to understand why it is crashing. That's consistent with general chromium culture to try to minimize these. It's OK if you think this will save you time later to leave it, though, it's a judgement call. If you added them because you ran into a confusing crash and don't want to waste time again, then you are justified in keeping them.
https://codereview.chromium.org/2783283002/diff/60001/device/bluetooth/blueto... File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2783283002/diff/60001/device/bluetooth/blueto... device/bluetooth/bluetooth_adapter_mac.mm:644: DCHECK(device_mac); On 2017/03/30 23:16:08, jlebel wrote: > On 2017/03/30 22:48:41, scheib wrote: > > This DCHECK is redundant with the "*device_mac" isn't it? If device_mac is > null > > then a crash will occur and the stack should be produced blaming that line, it > > should be easy to understand. -- If I'm wrong, by all means use a DCHECK to > make > > it clear. > > It will crash, but somewhere in operator<< related to > BluetoothLowEnergyDeviceMac. My idea was to make it very clear. There is also > one difference, null will be caught by the DCHECK, a deallocated device will > crash in the operator<<. > > Do you think I should remove the DCHECK? Done.
The CQ bit was checked by jlebel@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from scheib@chromium.org Link to the patchset: https://codereview.chromium.org/2783283002/#ps80001 (title: "Removing DCHECK")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 80001, "attempt_start_ts": 1490945956999540,
"parent_rev": "01409c3315646cb0acca04308f67421410791800", "commit_rev":
"bf7b01a5ecefb707c69f90baa0850d5d7570215a"}
Message was sent while issue was closed.
Description was changed from ========== Adding log in BluetoothAdapterMac::CreateGattConnection() and BluetoothAdapterMac::DisconnectGatt() And removing from BluetoothLowEnergyDeviceMac::CreateGattConnectionImpl() and BluetoothLowEnergyDeviceMac::DisconnectGatt() This is to make sure no log are missed (when calling directly BluetoothAdapterMac). BUG=685972 ========== to ========== Adding log in BluetoothAdapterMac::CreateGattConnection() and BluetoothAdapterMac::DisconnectGatt() And removing from BluetoothLowEnergyDeviceMac::CreateGattConnectionImpl() and BluetoothLowEnergyDeviceMac::DisconnectGatt() This is to make sure no log are missed (when calling directly BluetoothAdapterMac). BUG=685972 Review-Url: https://codereview.chromium.org/2783283002 Cr-Commit-Position: refs/heads/master@{#461079} Committed: https://chromium.googlesource.com/chromium/src/+/bf7b01a5ecefb707c69f90baa085... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:80001) as https://chromium.googlesource.com/chromium/src/+/bf7b01a5ecefb707c69f90baa085... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
