[Webkit-unassigned] [Bug 221225] Implement WebXR getViewerPose and getPose

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 15 04:41:38 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221225

--- Comment #9 from Imanol Fernandez <ifernandez at igalia.com> ---
(In reply to youenn fablet from comment #7)
> (In reply to Imanol Fernandez from comment #6)
> > Comment on attachment 420125 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=420125&action=review
> > 
> > >> Source/WebCore/Modules/webxr/WebXRBoundedReferenceSpace.cpp:41
> > >> +Ref<WebXRBoundedReferenceSpace> WebXRBoundedReferenceSpace::create(Document& document, WeakPtr<WebXRSession>&& session, XRReferenceSpaceType type)
> > > 
> > > I would pass a WebXRSession& if possible.
> > 
> > I don't think it's safe because JS can hold XRSpace instances after a
> > XRSession is destroyed.
> 
> I was meaning to pass a WebXRSession& but store a WeakPtr<>.
> This makes it clear for instance that session cannot be null.

ah ok. I tried to use WebXRSession& initially but there is a problem with getOffsetReferencespace. In that case we'd need to convert the WeakPtr<WebXRSession> to WebXRSession to create the new XRReferenceSpace. The spec does not define any exception for that case: https://immersive-web.github.io/webxr/#dom-xrreferencespace-getoffsetreferencespace

The exceptions are handled in getPose or getViewerPose calls

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210215/fe7b1e7a/attachment-0001.htm>


More information about the webkit-unassigned mailing list