Low chrome Logic Error 🔧 Commit mapped

Overview

Low
Severity
CVSS
No
Exploited ITW
Fixed
Fix Status
ImpactInappropriate implementation in WebXR
DescriptionInappropriate implementation in WebXR
ComponentWebXR
Bug ClassLogic Error
Tracker514039492
Fix commita40a093991cb (chromium/src) +6/-12
CISA KEVNot listed
CreditedGoogle
Disclosed2026-06-30

Changed Functions

FunctionChangeNotes
if
content/browser/xr/service/vr_service_impl.cc
modified

Files Changed

  • content/browser/xr/service/vr_service_impl.cc
From a40a093991cbad54cfd251015495a5d513829d9e Mon Sep 17 00:00:00 2001
From: Alexander Cooper <[email protected]>
Date: Tue, 26 May 2026 15:16:57 -0700
Subject: [PATCH] WebXR: Setup DOM overlay fullscreen state only on session success

Previously, when requesting a WebXR session with DOM Overlay, the
browser process would speculatively notify the RenderFrameHost that an
XR overlay was being set up prior to session confirmation. If the XR
runtime rejected or failed to establish the session, the browser could
get left in an inconsistent state regarding fullscreen entrance rules.

This change defers notifying the RenderFrameHost about the XR overlay
setup until after the immersive session has been fully established and
granted by the XR runtime.

Fixed: 514039492
Change-Id: Ie5eb759dc09fa239d93168b01f38b745f50b89cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7871342
Reviewed-by: Brandon Jones <[email protected]>
Commit-Queue: Brandon Jones <[email protected]>
Auto-Submit: Alexander Cooper <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1636518}
---

diff --git a/content/browser/xr/service/vr_service_impl.cc b/content/browser/xr/service/vr_service_impl.cc
index fdeeeba..eb9239c9 100644
--- a/content/browser/xr/service/vr_service_impl.cc
+++ b/content/browser/xr/service/vr_service_impl.cc
@@ -424,6 +424,12 @@
     return;
   }
 
+  if (enabled_features.contains(device::mojom::XRSessionFeature::DOM_OVERLAY)) {
+    // Tell RenderFrameHostImpl that we're setting up the WebXR DOM Overlay,
+    // it checks for this in EnterFullscreen via HasSeenRecentXrOverlaySetup().
+    render_frame_host_->SetIsXrOverlaySetup();
+  }
+
   // Get the metrics tracker for the new immersive session
   mojo::PendingRemote<device::mojom::XRSessionMetricsRecorder>
       session_metrics_recorder =
@@ -876,18 +882,6 @@
     }
   }
 
-  bool use_dom_overlay =
-      std::ranges::contains(runtime_options->required_features,
-                            device::mojom::XRSessionFeature::DOM_OVERLAY) ||
-      std::ranges::contains(runtime_options->optional_features,
-                            device::mojom::XRSessionFeature::DOM_OVERLAY);
-
-  if (use_dom_overlay) {
-    // Tell RenderFrameHostImpl that we're setting up the WebXR DOM Overlay,
-    // it checks for this in EnterFullscreen via HasSeenRecentXrOverlaySetup().
-    render_frame_host_->SetIsXrOverlaySetup();
-  }
-
   if (device::XRSessionModeUtils::IsImmersive(runtime_options->mode)) {
     if (!request.options->tracked_images.empty()) {
       DVLOG(3) << __func__ << ": request.options->tracked_images.size()="
Loading diff…

Original Bug Report

The reporter's bug is still restricted on the tracker. Chrome de-restricts security bugs ~30–90 days after the fix ships; a later run will backfill it here.