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 ed7de7450660e1c8274f95f1913cb45bcefe5357..3663b30982b8565f1f590bda7c665e060a02b826 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 |
// 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."; |