Skip to content

Commit d99fa1f

Browse files
committed
Propoal to allow management of persistent anchors
1 parent f91dd62 commit d99fa1f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.bs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ The {{XRSession}} is extended to contain an associated <dfn for=XRSession>set of
199199
<div class="unstable">
200200

201201
The {{XRSession}} is extended to contain an associated <dfn for=XRSession>map of persistent anchors</dfn> that is keyed with a UUID string and maps to an {{XRAnchor}}.
202+
The size of this map is determined by the user agent. The user agent MAY delete entries from this map for any reason. For instance, if the maximum number of system anchors
203+
is reached, the user agent MAY free up an entry to make space for the newly requested anchor.
202204

203205
</div>
204206

@@ -251,6 +253,7 @@ The {{XRSession/restorePersistentAnchor(uuid)}} method, when invoked on an {{XRS
251253
1. If |session|’s [=ended=] value is `true`, [=/reject=] |promise| with {{InvalidStateError}}, return |promise|, and abort these steps.
252254
1. Let |anchor| be the value of mapping from |uuid| on |session|'s [=XRSession/map of persistent anchors=].
253255
1. If |session|'s [=XRSession/map of new anchors=] contains a mapping from |anchor| to |promise|, [=/reject=] the |promise| with {{InvalidStateError}}, return |promise|, and abort these steps.
256+
1. If |session|'s [=XRSession/map of new anchors=] has reached a user agent maximum size, [=/reject=] |promise| with {{InvalidStateError}}, return |promise|, and abort these steps.
254257
1. Add |anchor| to |session|'s [=XRSession/set of tracked anchors=].
255258
1. Add a mapping from |anchor| to |promise| to |session|'s [=XRSession/map of new anchors=].
256259
1. Return |promise|.

0 commit comments

Comments
 (0)