Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c5f83e3e4f674bad0bc7960b18c7b4cba0923cc8
https://github.com/WebKit/WebKit/commit/c5f83e3e4f674bad0bc7960b18c7b4cba0923cc8
Author: Ruthvik Konda <[email protected]>
Date: 2026-04-23 (Thu, 23 Apr 2026)
Changed paths:
M Source/WebCore/Modules/webxr/WebXRSystem.cpp
Log Message:
-----------
Reduce use of `.get()` for smart pointers in WebXRSystem
https://bugs.webkit.org/show_bug.cgi?id=313067
rdar://175376725
Reviewed by Dan Glastonbury.
`ThreadSafeWeakPtr<T>::get()` returns `RefPtr<T>`, and `RefPtr<T>` has
`operator==` against both `RefPtr<T>` and raw `T*`. The extra `.get()`
chain in `m_activeImmersiveDevice.get().get() == X` unnecessarily
unwraps down to a raw pointer when the outer `RefPtr` can compare
directly. Simplify five sites in WebXRSystem.
No new tests needed (no behavioral change).
* Source/WebCore/Modules/webxr/WebXRSystem.cpp:
(WebCore::WebXRSystem::ensureImmersiveXRDeviceIsSelected):
(WebCore::WebXRSystem::unregisterSimulatedXRDeviceForTesting):
Canonical link: https://commits.webkit.org/311854@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications