New issue
Advanced search Search tips

Issue 699823 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Rethink the return value of FrameConnectedBluetoothDevices::CloseConnectionToDeviceWithAddress

Project Member Reported by juncai@chromium.org, Mar 9 2017

Issue description

Based on the comment at:
https://codereview.chromium.org/2718583002/diff/60001/content/browser/bluetooth/frame_connected_bluetooth_devices.cc

FrameConnectedBluetoothDevices::CloseConnectionToDeviceWithAddress returns the device id because we need it to send the event. But after the change of the above CL, we send the event from there and we don't need the device id. So the return value can be something else or even void.
 
Why don't we return a reference to the ptr instead? Otherwise we will need a test for the event being dispatched.

Comment 2 by juncai@chromium.org, Mar 10 2017

Status: Started (was: Assigned)

Comment 3 by juncai@chromium.org, Mar 21 2017

I took another look at this, and FrameConnectedBluetoothDevices::CloseConnectionToDeviceWithAddress() needs to erase the device::BluetoothGattConnection and the mojom associated pointer from the map. So these pointers become invalid after the function call.

Comment 4 by ortuno@chromium.org, Mar 28 2017

We could take the pointer out of the map then delete the connection and finally return the pointer, right?
Status: Available (was: Started)
Cc: juncai@chromium.org
Owner: ----
Project Member

Comment 7 by sheriffbot@chromium.org, Apr 6 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment