Index: content/browser/bluetooth/bluetooth_device_chooser_controller.cc |
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc |
index 7221db3b0d3fb12acd46bf314454c9670ee11b55..9e5b9b936c0c586869d57a58a7a3bb4a0949ebba 100644 |
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc |
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc |
@@ -342,15 +342,17 @@ void BluetoothDeviceChooserController::GetDevice( |
// TODO(crbug.com/518042): Enforce correctly-delegated permissions instead of |
// matching origins. When relaxing this, take care to handle non-sandboxed |
- // unique origins. |
+ // opaque origins. |
if (!embedding_origin.IsSameOriginWith(requesting_origin)) { |
PostErrorCallback(blink::mojom::WebBluetoothResult:: |
REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME); |
return; |
} |
- // The above also excludes unique origins, which are not even same-origin with |
+ // The above also excludes opaque origins, which are not even same-origin with |
ortuno
2017/02/23 21:59:34
Do opaque origins still generate the same key in m
Mike West
2017/02/24 08:01:45
I'd suggest doing this in a separate patch. Mechan
|
// themselves. |
- DCHECK(!requesting_origin.unique()); |
+ // TODO: This is no longer true, and will crash here if embedding_origin is |
+ // the same object as requesting_origin. |
+ DCHECK(!requesting_origin.opaque()); |
if (!adapter_->IsPresent()) { |
DVLOG(1) << "Bluetooth Adapter not present. Can't serve requestDevice."; |