diff --git a/dom/vr/XRInputSource.cpp b/dom/vr/XRInputSource.cpp index 415219e6efe3..30e53a57d954 100644 --- a/dom/vr/XRInputSource.cpp +++ b/dom/vr/XRInputSource.cpp @@ -16,7 +16,8 @@ namespace mozilla { namespace dom { -NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(XRInputSource, mParent) +NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(XRInputSource, mParent, mTargetRaySpace, + mGripSpace, mGamepad) NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(XRInputSource, AddRef) NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(XRInputSource, Release) diff --git a/dom/vr/XRSession.cpp b/dom/vr/XRSession.cpp index 905d50afdacc..1e2dd91e27b5 100644 --- a/dom/vr/XRSession.cpp +++ b/dom/vr/XRSession.cpp @@ -410,6 +410,9 @@ void XRSession::Shutdown() { mViewerPosePoolIndex = 0; mFramePool.Clear(); mFramePoolIndex = 0; + mActiveRenderState = nullptr; + mPendingRenderState = nullptr; + mFrameRequestCallbacks.Clear(); // Unregister from nsRefreshObserver if (mRefreshDriver) {