Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a35addd14f70c012ca29dff8cd48ebc398dbebe2
      
https://github.com/WebKit/WebKit/commit/a35addd14f70c012ca29dff8cd48ebc398dbebe2
  Author: Sergio Villar Senin <[email protected]>
  Date:   2026-03-17 (Tue, 17 Mar 2026)

  Changed paths:
    M Source/WebKit/UIProcess/XR/openxr/OpenXRHitTestManager.cpp
    M Source/WebKit/UIProcess/XR/openxr/OpenXRHitTestManager.h
    M Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp
    M Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.h

  Log Message:
  -----------
  [OpenXR] Crash when closing a session with hit testing
https://bugs.webkit.org/show_bug.cgi?id=310092

Reviewed by Fujii Hironori.

Cleaning up all the associated resources to the session was not freeing
the hit test manager which stored the handle of the OpenXR session. That
was causing crashes when exiting sessions with hit test enabled as the
session might be freed without the manager ever noticing.

We're implementing a multi-level solution
* Move the hit test manager from the RenderState to an attribute of the
  coordinator, makes sense as it's associated to the session.
* Remove the XrSession handle from the manager, we better pass it when
  required, that way the manager won't ever use an already freed session
* Clean up the hit test manager when exiting the session.

No new tests as this was failing only on devices with hit testing
enabled when using OpenXR backend.

* Source/WebKit/UIProcess/XR/openxr/OpenXRHitTestManager.cpp:
(WebKit::OpenXRHitTestManager::OpenXRHitTestManager):
(WebKit::OpenXRHitTestManager::requestHitTest):
* Source/WebKit/UIProcess/XR/openxr/OpenXRHitTestManager.h:
(): Deleted.
* Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp:
(WebKit::OpenXRCoordinator::requestHitTestSource):
(WebKit::OpenXRCoordinator::requestTransientInputHitTestSource):
(WebKit::OpenXRCoordinator::cleanupSessionAndAssociatedResources):
(WebKit::OpenXRCoordinator::populateFrameData):
* Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.h:

Canonical link: https://commits.webkit.org/309403@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to