Chromium Code Reviews| Index: content/browser/bluetooth/web_bluetooth_service_impl.cc |
| diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc |
| index 46c94f109ceaf62569af389968a7edaec44d75c4..3c6846f0a0d061c6ef87c5881356677779fa324e 100644 |
| --- a/content/browser/bluetooth/web_bluetooth_service_impl.cc |
| +++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc |
| @@ -650,10 +650,10 @@ void WebBluetoothServiceImpl::RequestDeviceImpl( |
| blink::mojom::WebBluetoothRequestDeviceOptionsPtr options, |
| const RequestDeviceCallback& callback, |
| device::BluetoothAdapter* adapter) { |
| - // requestDevice() can only be called when processing a user-gesture and |
| - // any user gesture outside of a chooser should close the chooser so we should |
| - // never get a request with an open chooser. |
| - CHECK(!device_chooser_controller_.get()); |
| + // requestDevice() can only be called when processing a user-gesture and any |
| + // user gesture outside of a chooser should close the chooser. But this does |
| + // not happen on all platforms so we manually close any open choosers. |
| + device_chooser_controller_.reset(); |
|
Jeffrey Yasskin
2016/06/10 00:49:22
Can you just delete this line? That'll wind up des
ortuno
2016/06/10 18:10:07
I revised the comment. Let me know if you don't th
Jeffrey Yasskin
2016/06/10 18:47:18
Well, the second chooser doesn't open until you ca
ortuno
2016/06/10 19:32:01
Done. Thanks for the suggestion!
|
| device_chooser_controller_.reset(new BluetoothDeviceChooserController( |
| this, render_frame_host_, adapter, |